Package com.jsoniter.any
Class Any
java.lang.Object
com.jsoniter.any.Any
- Direct Known Subclasses:
ArrayAny
,ArrayWrapperAny
,DoubleAny
,FalseAny
,FloatAny
,IntAny
,LazyAny
,ListWrapperAny
,LongAny
,MapWrapperAny
,NotFoundAny
,NullAny
,ObjectAny
,StringAny
,TrueAny
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final Any.EntryIterator
private static final Character
private static final int
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<T> T
as
(TypeLiteral<T> typeLiteral) <T> T
as
(TypeLiteral<T> typeLiteral, Object... keys) <T> T
<T> T
asList()
asMap()
<T> T
bindTo
(TypeLiteral<T> typeLiteral, T obj) <T> T
bindTo
(TypeLiteral<T> typeLiteral, T obj, Object... keys) <T> T
bindTo
(T obj) <T> T
entries()
boolean
get
(int index) final Any
int
hashCode()
protected boolean
isWildcard
(Object key) iterator()
keys()
static Any
lazyArray
(byte[] data, int head, int tail) static Any
lazyDouble
(byte[] data, int head, int tail) static Any
lazyLong
(byte[] data, int head, int tail) static Any
lazyObject
(byte[] data, int head, int tail) static Any
lazyString
(byte[] data, int head, int tail) abstract Object
object()
static void
protected JsonException
reportUnexpectedType
(ValueType toType) static Any
static Any
set
(double newVal) set
(float newVal) set
(int newVal) set
(long newVal) int
size()
abstract BigDecimal
final BigDecimal
toBigDecimal
(Object... keys) abstract BigInteger
final BigInteger
toBigInteger
(Object... keys) abstract boolean
final boolean
abstract double
toDouble()
final double
abstract float
toFloat()
final float
abstract int
toInt()
final int
abstract long
toLong()
final long
abstract String
toString()
final String
abstract ValueType
static Any
wrap
(boolean val) static Any
wrap
(double val) static Any
wrap
(float val) static Any
wrap
(int val) static Any
wrap
(long val) static Any
static Any
static <T> Any
wrap
(Collection<T> val) static <T> Any
static <T> Any
static Any
static Any
wrapNull()
abstract void
writeTo
(JsonStream stream) Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Field Details
-
EMPTY_KEYS
-
EMPTY_ENTRIES_ITERATOR
-
EMPTY_ITERATOR
-
wildcardHashCode
private static final int wildcardHashCode -
wildcard
-
-
Constructor Details
-
Any
public Any()
-
-
Method Details
-
registerEncoders
public static void registerEncoders() -
wrapArray
-
valueType
-
bindTo
-
bindTo
public <T> T bindTo(T obj) -
bindTo
-
bindTo
-
object
-
object
-
asMap
-
asList
-
as
-
as
-
as
-
as
-
toBoolean
-
toBoolean
public abstract boolean toBoolean() -
toInt
-
toInt
public abstract int toInt() -
toLong
-
toLong
public abstract long toLong() -
toFloat
-
toFloat
public abstract float toFloat() -
toDouble
-
toDouble
public abstract double toDouble() -
toBigInteger
-
toBigInteger
-
toBigDecimal
-
toBigDecimal
-
toString
-
toString
-
size
public int size() -
mustBeValid
-
keys
-
iterator
-
entries
-
get
-
get
-
get
-
get
-
set
-
set
-
set
-
set
-
set
-
writeTo
- Throws:
IOException
-
reportUnexpectedType
-
lazyString
-
lazyDouble
-
lazyLong
-
lazyArray
-
lazyObject
-
wrap
-
wrap
-
wrap
-
wrap
-
wrap
-
wrap
-
wrap
-
wrap
-
wrap
-
wrap
-
wrapNull
-
rewrap
-
rewrap
-
isWildcard
-
equals
-
hashCode
public int hashCode()
-