/** * Return the size of the map. Use the map if it has already been created. * @return size */ public int size() { this.buildIfNeededMap(); return map.size(); }
__index++; ValueMap map = useValues ? new ValueMapImpl() : new LazyValueMap( lazyChop ); Value value = new ValueContainer ( map );
__index++; ValueMap map = useValues ? new ValueMapImpl() : new LazyValueMap( lazyChop ); Value value = new ValueContainer ( map );
__index++; ValueMap map = useValues ? new ValueMapImpl() : new LazyValueMap( lazyChop ); Value value = new ValueContainer ( map );
/** * Return the size of the map. Use the map if it has already been created. * @return size */ public int size() { this.buildIfNeededMap(); return map.size(); }
ValueMap map = useValues ? new ValueMapImpl() : new LazyValueMap( lazyChop );
/** If the map has not been built yet, then we just return a fake entry set. */ @Override public Set<Entry<String, Value>> entrySet() { buildIfNeededMap(); return map.entrySet(); }
ValueMap map = useValues ? new ValueMapImpl() : new LazyValueMap( lazyChop );
/** If the map has not been built yet, then we just return a fake entry set. */ @Override public Set<Entry<String, Value>> entrySet() { buildIfNeededMap(); return map.entrySet(); }
ValueMap map = useValues ? new ValueMapImpl() : new LazyValueMap( lazyChop );
/** Return a collection of values. */ public Collection<Value> values() { this.buildIfNeededMap(); return map.values(); }
/** Return a collection of values. */ public Collection<Value> values() { this.buildIfNeededMap(); return map.values(); }
/** * Get the items for the key. * @param key key * @return value */ @Override public Value get( Object key ) { /* If the length is under and we are asking for the key, then just look for the key. Don't build the map. */ if ( map == null && items.length < 20 ) { for ( Object item : items ) { MapItemValue miv = ( MapItemValue ) item; if ( key.equals( miv.name.toValue() ) ) { return miv.value; } } return null; } else { if ( map == null ) buildIfNeededMap(); return map.get( key ); } }
/** * Get the items for the key. * @param key key * @return value */ @Override public Value get( Object key ) { /* If the length is under and we are asking for the key, then just look for the key. Don't build the map. */ if ( map == null && items.length < 20 ) { for ( Object item : items ) { MapItemValue miv = ( MapItemValue ) item; if ( key.equals( miv.name.toValue() ) ) { return miv.value; } } return null; } else { if ( map == null ) buildIfNeededMap(); return map.get( key ); } }