本文整理了Java中java.util.Properties.values()
方法的一些代码示例,展示了Properties.values()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Properties.values()
方法的具体详情如下:
包路径:java.util.Properties
类名称:Properties
方法名:values
暂无
代码示例来源:origin: apache/hive
@Override
public Collection<Object> values() {
if (interned != null) return interned.values();
else return super.values();
}
代码示例来源:origin: aa112901/remusic
public Collection<Object> values() {
return properties.values();
}
}
代码示例来源:origin: alibaba/TProfiler
public Collection<Object> values() {
return delegate.values();
}
代码示例来源:origin: robovm/robovm
@Override
public Collection<Object> values() {
return Collections.unmodifiableCollection(super.values());
}
代码示例来源:origin: knightliao/disconf
public Collection values() {
return getDelegate().values();
}
代码示例来源:origin: pentaho/pentaho-kettle
@SuppressWarnings( "unchecked" )
public void widgetSelected( SelectionEvent e ) {
Properties sp = System.getProperties();
Enumeration keys = sp.keys();
int size = sp.values().size();
String[] key = new String[size];
String[] val = new String[size];
String[] str = new String[size];
int i = 0;
while ( keys.hasMoreElements() ) {
key[i] = (String) keys.nextElement();
val[i] = sp.getProperty( key[i] );
str[i] = key[i] + " [" + val[i] + "]";
i++;
}
EnterSelectionDialog esd =
new EnterSelectionDialog( shell, str, "Select an Environment Variable", "Select an Environment Variable" );
if ( esd.open() != null ) {
int nr = esd.getSelectionNr();
wDbf.insert( "${" + key[nr] + "}" );
wDbf.setToolTipText( transMeta.environmentSubstitute( wDbf.getText() ) );
}
}
代码示例来源:origin: pentaho/pentaho-kettle
@SuppressWarnings( "unchecked" )
public void widgetSelected( SelectionEvent e ) {
Properties sp = System.getProperties();
Enumeration keys = sp.keys();
int size = sp.values().size();
String[] key = new String[size];
String[] val = new String[size];
String[] str = new String[size];
int i = 0;
while ( keys.hasMoreElements() ) {
key[i] = (String) keys.nextElement();
val[i] = sp.getProperty( key[i] );
str[i] = key[i] + " [" + val[i] + "]";
i++;
}
EnterSelectionDialog esd =
new EnterSelectionDialog( shell, str, "Select an Environment Variable", "Select an Environment Variable" );
if ( esd.open() != null ) {
int nr = esd.getSelectionNr();
wShape.insert( "%%" + key[nr] + "%%" );
wShape.setToolTipText( transMeta.environmentSubstitute( wShape.getText() ) );
}
}
代码示例来源:origin: pholser/junit-quickcheck
@Override public BigDecimal magnitude(Object value) {
Properties narrowed = narrow(value);
if (narrowed.isEmpty())
return ZERO;
BigDecimal keysMagnitude =
narrowed.keySet().stream()
.map(e -> stringGenerator.magnitude(e))
.reduce(ZERO, BigDecimal::add);
BigDecimal valuesMagnitude =
narrowed.values().stream()
.map(e -> stringGenerator.magnitude(e))
.reduce(ZERO, BigDecimal::add);
return BigDecimal.valueOf(narrowed.size())
.multiply(keysMagnitude)
.add(valuesMagnitude);
}
}
代码示例来源:origin: geotools/geotools
for (final Object wkt : this.definitions.values()) {
if (s.containsAxis((String) wkt)) {
LOGGER.fine(
代码示例来源:origin: org.apache.geronimo.ext.openejb/openejb-core
public int hasReference(ResourceInfo info){
for (Object value : info.properties.values()) {
if (ids.contains(value)) return GREATER;
}
return EQUAL;
}
代码示例来源:origin: com.gluonhq/robovm-rt
@Override
public Collection<Object> values() {
return Collections.unmodifiableCollection(super.values());
}
代码示例来源:origin: org.knopflerfish.bundle/cm-IMPL
private int checkSum(Properties p) {
int res = 0;
p.remove(CHKSUM_PROP);
for (Object o : p.values()) {
if (o instanceof String) {
res += 997 + 11 * ((String)o).length();
}
}
return res;
}
代码示例来源:origin: org.knopflerfish.bundle/cm
private int checkSum(Properties p) {
int res = 0;
p.remove(CHKSUM_PROP);
for (Object o : p.values()) {
if (o instanceof String) {
res += 997 + 11 * ((String)o).length();
}
}
return res;
}
代码示例来源:origin: org.refcodes/refcodes-configuration
/**
* {@inheritDoc}
*/
@Override
public Collection<String> values() {
List<String> theValues = new ArrayList<>();
java.util.Properties theProperties = System.getProperties();
for ( Object eValue : theProperties.values() ) {
theValues.add( eValue.toString() );
}
return theValues;
}
代码示例来源:origin: com.caucho/resin
public Collection values()
{
return getPutEnvironmentProperties().values();
}
代码示例来源:origin: org.apache.ivy/ivy
public Collection values() {
List ret = new ArrayList(super.values());
for (int i = 0; i < ret.size(); i++) {
ret.set(i, StringUtils.decrypt((String) ret.get(i)));
}
return ret;
}
}
代码示例来源:origin: com.oracle.tools/oracle-tools-runtime
/**
* {@inheritDoc}
*/
@Override
public Collection<Object> values()
{
return getDelegate().values();
}
代码示例来源:origin: com.oracle.bedrock/bedrock-runtime
/**
* {@inheritDoc}
*/
@Override
public Collection<Object> values()
{
return getDelegate().values();
}
代码示例来源:origin: net.roboconf/roboconf-dm
private boolean isTargetUsed( String targetId ) {
File usageFile = findTargetFile( targetId, TARGETS_USAGE_FILE );
Properties props = Utils.readPropertiesFileQuietly( usageFile, this.logger );
boolean found = false;
for( Iterator<Object> it = props.values().iterator(); it.hasNext() && ! found; ) {
found = it.next().equals( targetId );
}
return found;
}
代码示例来源:origin: apache/jackrabbit-oak
@Test
public void testCreationFromProperties() {
Properties properties = new Properties();
properties.put("a", "b");
ConfigurationParameters cp = ConfigurationParameters.of(properties);
assertEquals(ImmutableSet.copyOf(properties.keySet()), ImmutableSet.copyOf(cp.keySet()));
assertEquals(ImmutableSet.copyOf(properties.values()), ImmutableSet.copyOf(cp.values()));
}
内容来源于网络,如有侵权,请联系作者删除!