Class ListCodecStrict<A>

java.lang.Object
org.cyclops.cyclopscore.codec.ListCodecStrict<A>
All Implemented Interfaces:
com.mojang.serialization.Codec<List<A>>, com.mojang.serialization.Decoder<List<A>>, com.mojang.serialization.Encoder<List<A>>

public final class ListCodecStrict<A> extends Object implements com.mojang.serialization.Codec<List<A>>
A copy of ListCodec, but without allowed failures
  • Nested Class Summary

    Nested classes/interfaces inherited from interface com.mojang.serialization.Codec

    com.mojang.serialization.Codec.RecursiveCodec<T>, com.mojang.serialization.Codec.ResultFunction<A>

    Nested classes/interfaces inherited from interface com.mojang.serialization.Decoder

    com.mojang.serialization.Decoder.Boxed<A>, com.mojang.serialization.Decoder.Simple<A>, com.mojang.serialization.Decoder.Terminal<A>
  • Field Summary

    Fields inherited from interface com.mojang.serialization.Codec

    BOOL, BYTE, BYTE_BUFFER, DOUBLE, EMPTY, FLOAT, INT, INT_STREAM, LONG, LONG_STREAM, PASSTHROUGH, SHORT, STRING
  • Constructor Summary

    Constructors
    Constructor
    Description
    ListCodecStrict(com.mojang.serialization.Codec<A> elementCodec)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    <T> com.mojang.serialization.DataResult<com.mojang.datafixers.util.Pair<List<A>,T>>
    decode(com.mojang.serialization.DynamicOps<T> ops, T input)
     
    <T> com.mojang.serialization.DataResult<T>
    encode(List<A> input, com.mojang.serialization.DynamicOps<T> ops, T prefix)
     
    boolean
     
    int
     
     

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait

    Methods inherited from interface com.mojang.serialization.Codec

    comapFlatMap, deprecated, dispatch, dispatch, dispatchMap, dispatchMap, dispatchStable, fieldOf, flatComapMap, flatXmap, lenientOptionalFieldOf, lenientOptionalFieldOf, lenientOptionalFieldOf, lenientOptionalFieldOf, listOf, listOf, mapResult, optionalFieldOf, optionalFieldOf, optionalFieldOf, optionalFieldOf, orElse, orElse, orElse, orElseGet, orElseGet, orElseGet, partialDispatch, promotePartial, sizeLimitedListOf, stable, validate, withLifecycle, xmap

    Methods inherited from interface com.mojang.serialization.Decoder

    boxed, decode, flatMap, map, parse, parse, simple, terminal

    Methods inherited from interface com.mojang.serialization.Encoder

    comap, encodeStart, flatComap
  • Constructor Details

    • ListCodecStrict

      public ListCodecStrict(com.mojang.serialization.Codec<A> elementCodec)
  • Method Details

    • encode

      public <T> com.mojang.serialization.DataResult<T> encode(List<A> input, com.mojang.serialization.DynamicOps<T> ops, T prefix)
      Specified by:
      encode in interface com.mojang.serialization.Encoder<A>
    • decode

      public <T> com.mojang.serialization.DataResult<com.mojang.datafixers.util.Pair<List<A>,T>> decode(com.mojang.serialization.DynamicOps<T> ops, T input)
      Specified by:
      decode in interface com.mojang.serialization.Decoder<A>
    • equals

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

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object