public Collection<Object> values() { return properties.values(); } }
public Collection<Object> values() { return delegate.values(); }
@Override public Collection<Object> values() { return Collections.unmodifiableCollection(super.values()); }
public Collection values() { return getDelegate().values(); }
@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() ) ); } }
@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() ) ); } }
@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); } }
for (final Object wkt : this.definitions.values()) { if (s.containsAxis((String) wkt)) { LOGGER.fine(
public int hasReference(ResourceInfo info){ for (Object value : info.properties.values()) { if (ids.contains(value)) return GREATER; } return EQUAL; }
@Override public Collection<Object> values() { return Collections.unmodifiableCollection(super.values()); }
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; }
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; }
/** * {@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; }
public Collection values() { return getPutEnvironmentProperties().values(); }
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; } }
/** * {@inheritDoc} */ @Override public Collection<Object> values() { return getDelegate().values(); }
/** * {@inheritDoc} */ @Override public Collection<Object> values() { return getDelegate().values(); }
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; }
@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())); }