public class ValueContainer
extends Object
implements CharSequence, Value
Simple Value wrapper for literals and already-hydrated JSON containers.
| Modifiers | Name | Description |
|---|---|---|
static Value |
FALSE |
Shared wrapper for the JSON literal false. |
static Value |
NULL |
Shared wrapper for the JSON literal null. |
static Value |
TRUE |
Shared wrapper for the JSON literal true. |
boolean |
decodeStrings |
Indicates whether string values should decode escape sequences when materialized. |
Type |
type |
Token type represented by this wrapper. |
Object |
value |
Cached hydrated value, when one already exists. |
| Constructor and description |
|---|
ValueContainer(Object value, Type type, boolean decodeStrings)Creates a wrapper around an already known value and type. |
ValueContainer(Type type)Creates a wrapper for a scalar token that can be materialized later. |
ValueContainer(Map<String, Object> map)Creates a wrapper for a parsed object container. |
ValueContainer(List<Object> list)Creates a wrapper for a parsed array container. |
| Type Params | Return Type | Name and description |
|---|---|---|
|
public BigDecimal |
bigDecimalValue()Returns null because this wrapper is not numeric. |
|
public BigInteger |
bigIntegerValue()Returns null because this wrapper is not numeric. |
|
public boolean |
booleanValue()Converts this token to a boolean value.
|
|
public byte |
byteValue()Returns 0 because this wrapper is not numeric. |
|
public char |
charAt(int index)Returns the placeholder character '0' because no character data is available. |
|
public char |
charValue()Returns 0 because this wrapper is not backed by character data. |
|
public void |
chop()No-op because this wrapper does not retain a shared parser buffer. |
|
public Date |
dateValue()Returns null because this wrapper does not provide date conversion here. |
|
public double |
doubleValue()Returns 0 because this wrapper is not numeric. |
|
public float |
floatValue()Returns 0 because this wrapper is not numeric. |
|
public int |
intValue()Unsupported for these literal and container wrappers. |
|
public boolean |
isContainer()Indicates whether this value wraps a map or a collection.
|
|
public int |
length()Returns 0 because this wrapper does not expose a character sequence. |
|
public long |
longValue()Unsupported for these literal and container wrappers. |
|
public short |
shortValue()Returns 0 because this wrapper is not numeric. |
|
public String |
stringValue()Returns the string form using the value's configured decoding policy.
|
|
public String |
stringValueEncoded()Returns the fully decoded string form.
|
|
public CharSequence |
subSequence(int start, int end)Returns an empty character sequence because this wrapper has no character backing. |
<T extends Enum> |
public T |
toEnum(Class<T> cls)Returns the cached enum instance stored in this wrapper. |
|
public String |
toString()Returns the token name for this wrapper. |
|
public Object |
toValue()Materializes this token as a regular Java value.
|
Shared wrapper for the JSON literal false.
Shared wrapper for the JSON literal null.
Shared wrapper for the JSON literal true.
Indicates whether string values should decode escape sequences when materialized.
Token type represented by this wrapper.
Cached hydrated value, when one already exists.
Creates a wrapper around an already known value and type.
value - cached valuetype - token typedecodeStrings - whether string decoding should be appliedCreates a wrapper for a scalar token that can be materialized later.
type - token typeCreates a wrapper for a parsed object container.
map - hydrated object value Returns null because this wrapper is not numeric.
null Returns null because this wrapper is not numeric.
nullConverts this token to a boolean value.
Returns 0 because this wrapper is not numeric.
0 Returns the placeholder character '0' because no character data is available.
index - ignored'0' Returns 0 because this wrapper is not backed by character data.
0No-op because this wrapper does not retain a shared parser buffer.
Returns null because this wrapper does not provide date conversion here.
null Returns 0 because this wrapper is not numeric.
0 Returns 0 because this wrapper is not numeric.
0Unsupported for these literal and container wrappers.
Indicates whether this value wraps a map or a collection.
true for container values Returns 0 because this wrapper does not expose a character sequence.
0Unsupported for these literal and container wrappers.
Returns 0 because this wrapper is not numeric.
0Returns the string form using the value's configured decoding policy.
Returns the fully decoded string form.
Returns an empty character sequence because this wrapper has no character backing.
start - ignoredend - ignoredReturns the cached enum instance stored in this wrapper.
cls - enum typeT - enum typeReturns the token name for this wrapper.
Materializes this token as a regular Java value.
Copyright © 2003-2026 The Apache Software Foundation. All rights reserved.