Class Any

java.lang.Object
com.jsoniter.any.Any
All Implemented Interfaces:
Iterable<Any>
Direct Known Subclasses:
ArrayAny, ArrayWrapperAny, DoubleAny, FalseAny, FloatAny, IntAny, LazyAny, ListWrapperAny, LongAny, MapWrapperAny, NotFoundAny, NullAny, ObjectAny, StringAny, TrueAny

public abstract class Any extends Object implements Iterable<Any>
  • Field Details

    • EMPTY_KEYS

      protected static final Set<String> EMPTY_KEYS
    • EMPTY_ENTRIES_ITERATOR

      protected static final Any.EntryIterator EMPTY_ENTRIES_ITERATOR
    • EMPTY_ITERATOR

      protected static final Iterator<Any> EMPTY_ITERATOR
    • wildcardHashCode

      private static final int wildcardHashCode
    • wildcard

      private static final Character wildcard
  • Constructor Details

    • Any

      public Any()
  • Method Details

    • registerEncoders

      public static void registerEncoders()
    • wrapArray

      public static Any wrapArray(Object val)
    • valueType

      public abstract ValueType valueType()
    • bindTo

      public <T> T bindTo(T obj, Object... keys)
    • bindTo

      public <T> T bindTo(T obj)
    • bindTo

      public <T> T bindTo(TypeLiteral<T> typeLiteral, T obj, Object... keys)
    • bindTo

      public <T> T bindTo(TypeLiteral<T> typeLiteral, T obj)
    • object

      public Object object(Object... keys)
    • object

      public abstract Object object()
    • asMap

      public Map<String,Any> asMap()
    • asList

      public List<Any> asList()
    • as

      public <T> T as(Class<T> clazz, Object... keys)
    • as

      public <T> T as(Class<T> clazz)
    • as

      public <T> T as(TypeLiteral<T> typeLiteral, Object... keys)
    • as

      public <T> T as(TypeLiteral<T> typeLiteral)
    • toBoolean

      public final boolean toBoolean(Object... keys)
    • toBoolean

      public abstract boolean toBoolean()
    • toInt

      public final int toInt(Object... keys)
    • toInt

      public abstract int toInt()
    • toLong

      public final long toLong(Object... keys)
    • toLong

      public abstract long toLong()
    • toFloat

      public final float toFloat(Object... keys)
    • toFloat

      public abstract float toFloat()
    • toDouble

      public final double toDouble(Object... keys)
    • toDouble

      public abstract double toDouble()
    • toBigInteger

      public final BigInteger toBigInteger(Object... keys)
    • toBigInteger

      public abstract BigInteger toBigInteger()
    • toBigDecimal

      public final BigDecimal toBigDecimal(Object... keys)
    • toBigDecimal

      public abstract BigDecimal toBigDecimal()
    • toString

      public final String toString(Object... keys)
    • toString

      public abstract String toString()
      Overrides:
      toString in class Object
    • size

      public int size()
    • mustBeValid

      public Any mustBeValid()
    • keys

      public Set keys()
    • iterator

      public Iterator<Any> iterator()
      Specified by:
      iterator in interface Iterable<Any>
    • entries

      public Any.EntryIterator entries()
    • get

      public Any get(int index)
    • get

      public Any get(Object key)
    • get

      public final Any get(Object... keys)
    • get

      public Any get(Object[] keys, int idx)
    • set

      public Any set(int newVal)
    • set

      public Any set(long newVal)
    • set

      public Any set(float newVal)
    • set

      public Any set(double newVal)
    • set

      public Any set(String newVal)
    • writeTo

      public abstract void writeTo(JsonStream stream) throws IOException
      Throws:
      IOException
    • reportUnexpectedType

      protected JsonException reportUnexpectedType(ValueType toType)
    • lazyString

      public static Any lazyString(byte[] data, int head, int tail)
    • lazyDouble

      public static Any lazyDouble(byte[] data, int head, int tail)
    • lazyLong

      public static Any lazyLong(byte[] data, int head, int tail)
    • lazyArray

      public static Any lazyArray(byte[] data, int head, int tail)
    • lazyObject

      public static Any lazyObject(byte[] data, int head, int tail)
    • wrap

      public static Any wrap(int val)
    • wrap

      public static Any wrap(long val)
    • wrap

      public static Any wrap(float val)
    • wrap

      public static Any wrap(double val)
    • wrap

      public static Any wrap(boolean val)
    • wrap

      public static Any wrap(String val)
    • wrap

      public static <T> Any wrap(Collection<T> val)
    • wrap

      public static <T> Any wrap(List<T> val)
    • wrap

      public static <T> Any wrap(Map<String,T> val)
    • wrap

      public static Any wrap(Object val)
    • wrapNull

      public static Any wrapNull()
    • rewrap

      public static Any rewrap(List<Any> val)
    • rewrap

      public static Any rewrap(Map<String,Any> val)
    • isWildcard

      protected boolean isWildcard(Object key)
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object