本文整理了Java中net.roboconf.core.utils.Utils.format()
方法的一些代码示例,展示了Utils.format()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Utils.format()
方法的具体详情如下:
包路径:net.roboconf.core.utils.Utils
类名称:Utils
方法名:format
[英]Formats a collection of elements as a string.
[中]将元素集合格式化为字符串。
代码示例来源:origin: net.roboconf/roboconf-dm
@Override
public void removeFromList( String key, String value ) throws IOException {
Collection<String> values = getPreferencesAsCollection( key );
values.remove( value );
save( key, Utils.format( values, ", " ));
}
代码示例来源:origin: net.roboconf/roboconf-dm
@Override
public void addToList( String key, String value ) throws IOException {
Collection<String> values = getPreferencesAsCollection( key );
values.add( value );
save( key, Utils.format( values, ", " ));
}
代码示例来源:origin: roboconf/roboconf-platform
properties.setProperty( APPLICATION_EXTERNAL_EXPORTS, sb.toString());
properties.setProperty( APPLICATION_TAGS, Utils.format( descriptor.tags, ", " ));
Utils.writePropertiesFile( properties, f );
代码示例来源:origin: net.roboconf/roboconf-dm
String s = Utils.format( entry.getValue(), ", " );
format.put( entry.getKey(), s );
代码示例来源:origin: roboconf/roboconf-platform
@Test
public void testFormat() {
List<String> list = Arrays.asList( "1", "2", "", "3", "4" );
Assert.assertEquals( "1, 2, , 3, 4", Utils.format( list, ", " ));
Assert.assertEquals( "1 - 2 - - 3 - 4", Utils.format( list, " - " ));
}
代码示例来源:origin: roboconf/roboconf-platform
String s = Utils.format( instance.channels, ", " );
p = new BlockProperty( file, ParsingConstants.PROPERTY_INSTANCE_CHANNELS, s );
currentBlock.getInnerBlocks().add( p );
内容来源于网络,如有侵权,请联系作者删除!