Class DynamicLike<T>
java.lang.Object
com.mojang.serialization.DynamicLike<T>
- Direct Known Subclasses:
Dynamic, OptionalDynamic
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract DataResult<Boolean> booleanasBoolean(boolean defaultValue) byteasByte(byte defaultValue) abstract DataResult<ByteBuffer> doubleasDouble(double defaultValue) floatasFloat(float defaultValue) intasInt(int defaultValue) abstract DataResult<IntStream> <U> List<U> <U> DataResult<List<U>> longasLong(long defaultValue) abstract DataResult<LongStream> <K,V> Map <K, V> asMapOpt()<K,V> DataResult <Map<K, V>> abstract DataResult<Number> asNumber()shortasShort(short defaultValue) asStream()abstract DataResult<Stream<Dynamic<T>>> abstract DataResult<String> asString()createBoolean(boolean value) createByte(byte value) Dynamic<?> createByteList(ByteBuffer input) createDouble(double value) createFloat(float value) createInt(int value) Dynamic<?> createIntList(IntStream input) createList(Stream<? extends Dynamic<?>> input) createLong(long value) Dynamic<?> createLongList(LongStream input) createShort(short value) createString(String value) abstract <A> DataResult<Pair<A, T>> emptyMap()abstract OptionalDynamic<T> abstract DataResult<T> getElement(String key) getElement(String key, T defaultValue) abstract DataResult<T> getElementGeneric(T key) getElementGeneric(T key, T defaultValue) abstract DataResult<T> getGeneric(T key) getOps()<A> DataResult<A> <E> DataResult<List<E>> <E> DataResult<List<E>> readList(Function<? super Dynamic<?>, ? extends DataResult<? extends E>> decoder) <R> DataResult<R> readMap(DataResult<R> empty, Function3<R, Dynamic<T>, Dynamic<T>, DataResult<R>> combiner) <K,V> DataResult <List<Pair<K, V>>> <K,V> DataResult <List<Pair<K, V>>>
-
Field Details
-
ops
-
-
Constructor Details
-
DynamicLike
-
-
Method Details
-
getOps
-
asNumber
-
asString
-
asBoolean
-
asStreamOpt
-
asMapOpt
-
asByteBufferOpt
-
asIntStreamOpt
-
asLongStreamOpt
-
get
-
getGeneric
-
getElement
-
getElementGeneric
-
decode
-
asListOpt
-
asMapOpt
-
read
-
readList
-
readList
public <E> DataResult<List<E>> readList(Function<? super Dynamic<?>, ? extends DataResult<? extends E>> decoder) -
readMap
-
readMap
-
readMap
public <R> DataResult<R> readMap(DataResult<R> empty, Function3<R, Dynamic<T>, Dynamic<T>, DataResult<R>> combiner) -
asNumber
-
asInt
public int asInt(int defaultValue) -
asLong
public long asLong(long defaultValue) -
asFloat
public float asFloat(float defaultValue) -
asDouble
public double asDouble(double defaultValue) -
asByte
public byte asByte(byte defaultValue) -
asShort
public short asShort(short defaultValue) -
asBoolean
public boolean asBoolean(boolean defaultValue) -
asString
-
asStream
-
asByteBuffer
-
asIntStream
-
asLongStream
-
asList
-
asMap
-
getElement
-
getElementGeneric
-
emptyList
-
emptyMap
-
createNumeric
-
createByte
-
createShort
-
createInt
-
createLong
-
createFloat
-
createDouble
-
createBoolean
-
createString
-
createList
-
createMap
-
createByteList
-
createIntList
-
createLongList
-