newItemValue = ((Value) itemValue).toValue(); } else { newItemValue = itemValue;
convertedValue = (V) ((Value) value).toValue(); } else { convertedValue = (V) value;
private Object convert( Value value ) { return value.toValue(); }
private Object convert( Value value ) { return value.toValue(); }
private final void buildMap() { map = new LinkedHashMap<>( items.length ); for ( Entry<String, Value> miv : items ) { if ( miv == null ) { break; } map.put( miv.getKey(), miv.getValue().toValue() ); } len = 0; items = null; }
@Override public final void setFromValue( Object obj, Value value ) { setValue( obj, value.toValue() ); }
@Override public final void setFromValue( Object obj, Value value ) { setValue( obj, value.toValue() ); }
private final void buildMap() { /** added to avoid hash collision attack. */ if (Sys.is1_7OrLater() && althashingThreshold) { map = new HashMap<>( items.length ); } else { map = new TreeMap<>(); } for ( Entry<String, Value> miv : items ) { if ( miv == null ) { break; } map.put( miv.getKey(), miv.getValue().toValue() ); } len = 0; items = null; }
/** * 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 ); } }
public Object parse( char[] chars ) { lastIndex = chars.length -1; __index = 0; charArray = chars; Value value = decodeValueOverlay( ); if (value.isContainer ()) { return value.toValue (); } else { return value; } } }
void chopContainer( Value value ) { Object obj = value.toValue(); if ( obj instanceof LazyValueMap ) { LazyValueMap map = ( LazyValueMap ) obj; map.chopMap(); } else if ( obj instanceof ValueList ) { ValueList list = ( ValueList ) obj; list.chopList(); } }
public Object parse( char[] chars ) { lastIndex = chars.length -1; __index = 0; charArray = chars; Value value = decodeValueOverlay( ); if (value.isContainer ()) { return value.toValue (); } else { return value; } } }
void chopContainer( Value value ) { Object obj = value.toValue(); if ( obj instanceof LazyValueMap ) { LazyValueMap map = ( LazyValueMap ) obj; map.chopMap(); } else if ( obj instanceof ValueList ) { ValueList list = ( ValueList ) obj; list.chopList(); } }
private void chopContainer( Value value ) { Object obj = value.toValue(); if ( obj instanceof LazyValueMap ) { LazyValueMap map = ( LazyValueMap ) obj; map.chopMap(); } else if ( obj instanceof ValueList ) { ValueList list = ( ValueList ) obj; list.chopList(); } }
private void chopContainer( Value value ) { Object obj = value.toValue(); if ( obj instanceof LazyValueMap ) { LazyValueMap map = ( LazyValueMap ) obj; map.chopMap(); } else if ( obj instanceof ValueList ) { ValueList list = ( ValueList ) obj; list.chopList(); } }
public Object parse( char[] chars ) { lastIndex = chars.length -1; __index = 0; charArray = chars; Value value = decodeValueOverlay( ); if (value.isContainer ()) { return value.toValue (); } else { return value; } } }
@Override public Object parse( char[] chars ) { lastIndex = chars.length -1; try { __index = 0; charArray = chars; Value value = decodeValueInternal( true ); if (value.isContainer ()) { return value.toValue (); } else { return value; } } catch (StopException stop) { return root; } }
@Override public Object parse( char[] chars ) { lastIndex = chars.length -1; try { __index = 0; charArray = chars; Value value = decodeValueInternal( true ); if (value.isContainer ()) { return value.toValue (); } else { return value; } } catch (StopException stop) { return root; } }
@Override public Object parse( char[] chars ) { lastIndex = chars.length -1; try { __index = 0; charArray = chars; Value value = decodeValueInternal( true ); if (value.isContainer ()) { return value.toValue (); } else { return value; } } catch (StopException stop) { return root; } }