Class CodecsKt

  • All Implemented Interfaces:

    
    public final class CodecsKt
    
                        
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      final static <A extends Any> Codec<List<A>> listOrElement(Codec<A> $self) このCodecを,要素が一つの場合はそのままコーデックするListのCodecに変換します。
      final static <A extends Any> Codec<List<A>> listOrElement(Codec<A> $self, Integer min, Integer max) このCodecを,要素が一つの場合はそのままコーデックするListのCodecに変換します。
      final static <T extends Any> DataResult<T> toData(Result<T> $self)
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

    • Method Detail

      • listOrElement

         final static <A extends Any> Codec<List<A>> listOrElement(Codec<A> $self)

        このCodecを,要素が一つの場合はそのままコーデックするListのCodecに変換します。

        Since:

        0.1.0

      • listOrElement

         final static <A extends Any> Codec<List<A>> listOrElement(Codec<A> $self, Integer min, Integer max)

        このCodecを,要素が一つの場合はそのままコーデックするListのCodecに変換します。

        Parameters:
        min - リストの長さの最小値
        max - リストの長さの最大値
        Returns:

        リストの長さが制限されたListBiCodec

        Since:

        0.1.0

      • toData

         final static <T extends Any> DataResult<T> toData(Result<T> $self)
        Since:

        0.1.0