org.apache.cassandra.db.marshal

## Class ListType<T>

- java.lang.Object
- - org.apache.cassandra.db.marshal.AbstractType<T>
  - - org.apache.cassandra.db.marshal.CollectionType<java.util.List<T>>
    - - org.apache.cassandra.db.marshal.ListType<T>

- All Implemented Interfaces:
    java.util.Comparator<java.nio.ByteBuffer>

      public class ListType<T>
      extends CollectionType<java.util.List<T>>

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class org.apache.cassandra.db.marshal.CollectionType

      `CollectionType.Kind`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `AbstractType<T>` | `elements`

    - ### Fields inherited from class org.apache.cassandra.db.marshal.CollectionType

      `kind, MAX_ELEMENTS`

    - ### Fields inherited from class org.apache.cassandra.db.marshal.AbstractType

      `columnComparator, columnReverseComparator, indexComparator, indexReverseComparator, onDiskAtomComparator, reverseComparator`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected void` | `appendToStringBuilder(java.lang.StringBuilder sb)`
    `java.util.List<T>` | `compose(java.nio.ByteBuffer bytes)`
    `java.nio.ByteBuffer` | `decompose(java.util.List<T> value)` Layout is: `<n><s_1><b_1>...<s_n><b_n>` where: n is the number of elements s_i is the number of bytes composing the ith element b_i is the s_i bytes composing the ith element
    `static <T> ListType<T>` | `getInstance(AbstractType<T> elements)`
    `static ListType<?>` | `getInstance(TypeParser parser)`
    `AbstractType<java.util.UUID>` | `nameComparator()`
    `java.nio.ByteBuffer` | `serialize(java.util.List<Pair<java.nio.ByteBuffer,IColumn>> columns)`
    `AbstractType<T>` | `valueComparator()`

    - ### Methods inherited from class org.apache.cassandra.db.marshal.CollectionType

      `asCQL3Type, compare, enforceLimit, fromString, getString, getUnsignedShort, isCollection, pack, pack, toString, validate`

    - ### Methods inherited from class org.apache.cassandra.db.marshal.AbstractType

      `compareCollectionMembers, fromStringCQL2, getColumnsString, getReverseComparator, getString, isCommutative, isCompatibleWith, isValueCompatibleWith, parseDefaultParameters, validateCollectionMember`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

    - ### Methods inherited from interface java.util.Comparator

      `equals`

- - ### Field Detail

    - #### elements

          public final AbstractType<T> elements

  - ### Method Detail

    - #### getInstance

          public static ListType<?> getInstance(TypeParser parser)
                                         throws ConfigurationException,
                                                SyntaxException

      Throws:
        `ConfigurationException`
        `SyntaxException`

    - #### getInstance

          public static <T> ListType<T> getInstance(AbstractType<T> elements)

    - #### nameComparator

          public AbstractType<java.util.UUID> nameComparator()

      Specified by:
        `nameComparator` in class `CollectionType<java.util.List<T>>`

    - #### valueComparator

          public AbstractType<T> valueComparator()

      Specified by:
        `valueComparator` in class `CollectionType<java.util.List<T>>`

    - #### compose

          public java.util.List<T> compose(java.nio.ByteBuffer bytes)

      Specified by:
        `compose` in class `AbstractType<java.util.List<T>>`

    - #### decompose

          public java.nio.ByteBuffer decompose(java.util.List<T> value)

      Layout is: `<n><s_1><b_1>...<s_n><b_n>` where: n is the number of elements s_i is the number of bytes composing the ith element b_i is the s_i bytes composing the ith element
      Specified by:
        `decompose` in class `AbstractType<java.util.List<T>>`

    - #### appendToStringBuilder

          protected void appendToStringBuilder(java.lang.StringBuilder sb)

      Specified by:
        `appendToStringBuilder` in class `CollectionType<java.util.List<T>>`

    - #### serialize

          public java.nio.ByteBuffer serialize(java.util.List<Pair<java.nio.ByteBuffer,IColumn>> columns)

      Specified by:
        `serialize` in class `CollectionType<java.util.List<T>>`

Copyright © 2014 The Apache Software Foundation