public class CharSequenceValue
extends Object
implements Value, CharSequence
Overlay-backed Value that keeps a character slice until conversion is required.
| Constructor and description |
|---|
CharSequenceValue(boolean chop, Type type, int startIndex, int endIndex, char[] buffer, boolean encoded, boolean checkDate)Creates a value view over a character buffer slice. |
| Type Params | Return Type | Name and description |
|---|---|---|
|
public BigDecimal |
bigDecimalValue()* Converts this token to a BigDecimal. * *
|
|
public BigInteger |
bigIntegerValue()* Converts this token to a BigInteger. * *
|
|
public boolean |
booleanValue()* Converts this token to a boolean value. * *
|
|
public byte |
byteValue()* Converts this token to a byte value. * *
|
|
public final char |
charAt(int index)Returns the character at the supplied backing-buffer index. |
|
public char |
charValue()* Converts this token to a single character. * *
|
|
public final void |
chop()* Copies any shared backing buffer into a dedicated slice. |
|
public Date |
dateValue()* Converts this token to a Date. * *
|
|
public double |
doubleValue()* Converts this token to a double value. * *
|
|
public boolean |
equals(Object o)Compares the overlay state and cached value. |
|
public float |
floatValue()* Converts this token to a float value. * *
|
|
public int |
hashCode()Returns a hash code for the overlay state and cached value. |
|
public int |
intValue()* Converts this token to an int value. * *
|
|
public boolean |
isContainer()* Indicates whether this value wraps a map or a collection. * *
|
|
public final int |
length()Returns the length of the current backing buffer. |
|
public long |
longValue()* Converts this token to a long value. * *
|
|
public short |
shortValue()* Converts this token to a short value. * *
|
|
public String |
stringValue()* Returns the string form using the value's configured decoding policy. * *
|
|
public String |
stringValueEncoded()* Returns the fully decoded string form. * *
|
|
public final CharSequence |
subSequence(int start, int end)Creates another overlay view over the same backing buffer. |
<T extends Enum> |
public T |
toEnum(Class<T> cls)* Converts this token to an enum constant. * *
|
<T extends Enum> |
public static T |
toEnum(Class<T> cls, String value)Resolves an enum constant from the decoded token text. |
<T extends Enum> |
public static T |
toEnum(Class<T> cls, int value)Resolves an enum constant from its ordinal. |
|
public String |
toString()Returns the current character slice without additional decoding. |
|
public final Object |
toValue()* Materializes this token as a regular Java value. * *
|
Creates a value view over a character buffer slice.
chop - whether to copy the slice immediatelytype - token typestartIndex - slice startendIndex - slice endbuffer - backing bufferencoded - whether string decoding should be appliedcheckDate - whether string values should be probed for date conversion* Converts this token to a BigDecimal. * *
* Converts this token to a BigInteger. * *
* Converts this token to a boolean value. * *
* Converts this token to a byte value. * *
Returns the character at the supplied backing-buffer index.
index - backing-buffer indexindex* Converts this token to a single character. * *
* Copies any shared backing buffer into a dedicated slice.
* Converts this token to a double value. * *
Compares the overlay state and cached value.
o - other objecttrue when the overlays match* Converts this token to a float value. * *
Returns a hash code for the overlay state and cached value.
* Converts this token to an int value. * *
* Indicates whether this value wraps a map or a collection. * *
true for container valuesReturns the length of the current backing buffer.
* Converts this token to a long value. * *
* Converts this token to a short value. * *
* Returns the string form using the value's configured decoding policy. * *
* Returns the fully decoded string form. * *
Creates another overlay view over the same backing buffer.
start - subsequence start in the backing bufferend - subsequence end in the backing buffer* Converts this token to an enum constant. * *
cls - enum type to resolve
*T - enum type
*Resolves an enum constant from the decoded token text.
cls - enum typevalue - decoded token textT - enum typeResolves an enum constant from its ordinal.
cls - enum typevalue - ordinal valueT - enum typeReturns the current character slice without additional decoding.
* Materializes this token as a regular Java value. * *
Copyright © 2003-2026 The Apache Software Foundation. All rights reserved.