public Iterator<?> getKeys( final Enum<?> key ) { return getKeys( key.name().toLowerCase() ); }
public Iterator<?> getKeys( final Enum<?> key ) { return getKeys( key.name().toLowerCase() ); }
public Iterator<?> getKeys(final Enum<?> key) { return getKeys(key.name().toLowerCase()); }
public int hashCode() { int h = 0; for( Iterator<?> i = getKeys(); i.hasNext(); ) h = h * 31 + Arrays.hashCode( getStringArray( (String)i.next() ) ); return h; }
@Override public int hashCode() { int h = 0; for(Iterator<?> i = getKeys(); i.hasNext();) h = h * 31 + Arrays.hashCode(getStringArray((String)i.next())); return h; }
public int hashCode() { int h = 0; for( Iterator<?> i = getKeys(); i.hasNext(); ) h = h * 31 + Arrays.hashCode( getStringArray( (String)i.next() ) ); return h; }
/** Returns true if the provided object is equal to this set of properties. * * <p>Equality between set of properties happens when the keys are the same, * and the list of strings associated with each key is the same. Note that the order * in which different keys appear in a property file is irrelevant, but <em>the order * between properties with the same key is significant</em>. * * <p>Due to the strictness of the check (e.g., no number conversion is performed) * this method is mainly useful when writing tests. * * @return true if the argument is equal to this set of properties. */ @Override public boolean equals(final Object o) { if (! (o instanceof Properties)) return false; final Properties p = (Properties)o; for(Iterator<?> i = getKeys(); i.hasNext();) { String key = (String)i.next(); String[] value = p.getStringArray(key); if (value == null || ! Arrays.equals(getStringArray(key), value)) return false; } for(Iterator<?> i = p.getKeys(); i.hasNext();) if (getStringArray((String)i.next()) == null) return false; return true; }
/** Returns true if the provided object is equal to this set of properties. * * <p>Equality between set of properties happens when the keys are the same, * and the list of strings associated to each key is the same. Note that the order * in which different keys appear in a property file is irrelevant, but <em>the order * between properties with the same key is significant</em>. * * <p>Due to the strictness of the check (e.g., no number conversion is performed) * this method is mainly useful when writing tests. * * @return true if the argument is equal to this set of properties. */ public boolean equals( final Object o ) { if ( ! ( o instanceof Properties ) ) return false; final Properties p = (Properties)o; for( Iterator<?> i = getKeys(); i.hasNext(); ) { String key = (String)i.next(); String[] value = p.getStringArray( key ); if ( value == null || ! Arrays.equals( getStringArray( key ), value ) ) return false; } for( Iterator<?> i = p.getKeys(); i.hasNext(); ) if ( getStringArray( (String)i.next() ) == null ) return false; return true; }
/** Returns true if the provided object is equal to this set of properties. * * <p>Equality between set of properties happens when the keys are the same, * and the list of strings associated to each key is the same. Note that the order * in which different keys appear in a property file is irrelevant, but <em>the order * between properties with the same key is significant</em>. * * <p>Due to the strictness of the check (e.g., no number conversion is performed) * this method is mainly useful when writing tests. * * @return true if the argument is equal to this set of properties. */ public boolean equals( final Object o ) { if ( ! ( o instanceof Properties ) ) return false; final Properties p = (Properties)o; for( Iterator<?> i = getKeys(); i.hasNext(); ) { String key = (String)i.next(); String[] value = p.getStringArray( key ); if ( value == null || ! Arrays.equals( getStringArray( key ), value ) ) return false; } for( Iterator<?> i = p.getKeys(); i.hasNext(); ) if ( getStringArray( (String)i.next() ) == null ) return false; return true; }
/** Scans the property set, parsing the properties that concern this class. * * @param properties a set of properties. * @return a metadata map. */ @SuppressWarnings("unchecked") public Reference2ObjectMap<Enum<?>,Object> parseProperties( final Properties properties ) throws ConfigurationException { String key, qualifier, className = this.getClass().getName(); int lastDot; Reference2ObjectArrayMap<Enum<?>,Object> metadata = new Reference2ObjectArrayMap<Enum<?>,Object>(); for( Iterator<?> i = properties.getKeys(); i.hasNext(); ) { key = i.next().toString(); lastDot = key.lastIndexOf( '.' ); qualifier = lastDot == -1 ? "" : key.substring( 0, lastDot ); if ( className.startsWith( qualifier ) && ! parseProperty( key.substring( lastDot + 1 ), properties.getStringArray( key ), metadata ) && className.equals( qualifier ) ) throw new ConfigurationException( "Unknown property " + key ); } return metadata.isEmpty() ? Reference2ObjectMaps.EMPTY_MAP : metadata; }
/** Scans the property set, parsing the properties that concern this class. * * @param properties a set of properties. * @return a metadata map. */ @SuppressWarnings("unchecked") public Reference2ObjectMap<Enum<?>,Object> parseProperties( final Properties properties ) throws ConfigurationException { String key, qualifier, className = this.getClass().getName(); int lastDot; Reference2ObjectArrayMap<Enum<?>,Object> metadata = new Reference2ObjectArrayMap<Enum<?>,Object>(); for( Iterator<?> i = properties.getKeys(); i.hasNext(); ) { key = i.next().toString(); lastDot = key.lastIndexOf( '.' ); qualifier = lastDot == -1 ? "" : key.substring( 0, lastDot ); if ( className.startsWith( qualifier ) && ! parseProperty( key.substring( lastDot + 1 ), properties.getStringArray( key ), metadata ) && className.equals( qualifier ) ) throw new ConfigurationException( "Unknown property " + key ); } return metadata.isEmpty() ? Reference2ObjectMaps.EMPTY_MAP : metadata; }
/** Scans the property set, parsing the properties that concern this class. * * @param properties a set of properties. * @return a metadata map. */ @SuppressWarnings("unchecked") public Reference2ObjectMap<Enum<?>,Object> parseProperties( final Properties properties ) throws ConfigurationException { String key, qualifier, className = this.getClass().getName(); int lastDot; Reference2ObjectArrayMap<Enum<?>,Object> metadata = new Reference2ObjectArrayMap<Enum<?>,Object>(); for( Iterator<?> i = properties.getKeys(); i.hasNext(); ) { key = i.next().toString(); lastDot = key.lastIndexOf( '.' ); qualifier = lastDot == -1 ? "" : key.substring( 0, lastDot ); if ( className.startsWith( qualifier ) && ! parseProperty( key.substring( lastDot + 1 ), properties.getStringArray( key ), metadata ) && className.equals( qualifier ) ) throw new ConfigurationException( "Unknown property " + key ); } return metadata.isEmpty() ? Reference2ObjectMaps.EMPTY_MAP : metadata; }
/** Scans the property set, parsing the properties that concern this class. * * @param properties a set of properties. * @return a metadata map. */ @SuppressWarnings("unchecked") public Reference2ObjectMap<Enum<?>,Object> parseProperties( final Properties properties ) throws ConfigurationException { String key, qualifier, className = this.getClass().getName(); int lastDot; Reference2ObjectArrayMap<Enum<?>,Object> metadata = new Reference2ObjectArrayMap<Enum<?>,Object>(); for( Iterator<?> i = properties.getKeys(); i.hasNext(); ) { key = i.next().toString(); lastDot = key.lastIndexOf( '.' ); qualifier = lastDot == -1 ? "" : key.substring( 0, lastDot ); if ( className.startsWith( qualifier ) && ! parseProperty( key.substring( lastDot + 1 ), properties.getStringArray( key ), metadata ) && className.equals( qualifier ) ) throw new ConfigurationException( "Unknown property " + key ); } return metadata.isEmpty() ? Reference2ObjectMaps.EMPTY_MAP : metadata; }
Properties indexProps = new Properties(propsFile); indexProps.setAutoSave(false); Iterator<String> keysIter = indexProps.getKeys(); String OLDPKG = "it.unimi.dsi.mg4j"; String NEWPKG = "it.unimi.dsi.big.mg4j";