Class TokenSequences

java.lang.Object
com.pervasive.datarush.sequences.TokenSequences

public class TokenSequences extends Object
Utilities for working with arrays of tokens.
  • Method Details

    • binaryList

      public static MutableBinaryTokenSequence binaryList(int capacity, DataRepresentation representation)
      Creates a MutableBinaryTokenSequence with the specified capacity, optionally optimized for sparse data.
      Parameters:
      capacity - the initial capacity
      representation - the data representation
      Returns:
      the newly created token sequence.
    • booleanList

      public static MutableBooleanTokenSequence booleanList(int capacity, DataRepresentation representation)
      Creates a MutableBooleanTokenSequence with the specified capacity, optionally optimized for sparse data.
      Parameters:
      capacity - the initial capacity
      representation - the data representation
      Returns:
      the newly created token sequence.
    • charList

      public static MutableCharTokenSequence charList(int capacity, DataRepresentation representation)
      Creates a MutableCharTokenSequence with the specified capacity, optionally optimized for sparse data.
      Parameters:
      capacity - the initial capacity
      representation - the data representation
      Returns:
      the newly created token sequence.
    • durationList

      public static MutableDurationTokenSequence durationList(int capacity, DataRepresentation representation)
      Creates a MutableDurationTokenSequence with the specified capacity, optionally optimized for sparse data.
      Parameters:
      capacity - the initial capacity
      representation - the data representation
      Returns:
      the newly created token sequence.
    • dateList

      public static MutableDateTokenSequence dateList(int capacity, DataRepresentation representation)
      Creates a MutableDateTokenSequence with the specified capacity, optionally optimized for sparse data.
      Parameters:
      capacity - the initial capacity
      representation - the data representation
      Returns:
      the newly created token sequence.
    • doubleList

      public static MutableDoubleTokenSequence doubleList(int capacity, DataRepresentation representation)
      Creates a MutableDoubleTokenSequence with the specified capacity, optionally optimized for sparse data.
      Parameters:
      capacity - the initial capacity
      representation - the data representation
      Returns:
      the newly created token sequence.
    • floatList

      public static MutableFloatTokenSequence floatList(int capacity, DataRepresentation representation)
      Creates a MutableFloatTokenSequence with the specified capacity, optionally optimized for sparse data.
      Parameters:
      capacity - the initial capacity
      representation - the data representation
      Returns:
      the newly created token sequence.
    • intList

      public static MutableIntTokenSequence intList(int capacity, DataRepresentation representation)
      Creates a MutableIntTokenSequence with the specified capacity, optionally optimized for sparse data.
      Parameters:
      capacity - the initial capacity
      representation - the data representation
      Returns:
      the newly created token sequence.
    • ip4AddressList

      public static MutableIp4AddressTokenSequence ip4AddressList(int capacity, DataRepresentation representation)
      Creates a MutableIp4AddressTokenSequence with the specified capacity, optionally optimized for sparse data.
      Parameters:
      capacity - the initial capacity
      representation - the data representation
      Returns:
      the newly created token sequence.
    • ip6AddressList

      public static MutableIp6AddressTokenSequence ip6AddressList(int capacity, DataRepresentation representation)
      Creates a MutableIp6AddressTokenSequence with the specified capacity, optionally optimized for sparse data.
      Parameters:
      capacity - the initial capacity
      representation - the data representation
      Returns:
      the newly created token sequence.
    • longList

      public static MutableLongTokenSequence longList(int capacity, DataRepresentation representation)
      Creates a MutableLongTokenSequence with the specified capacity, optionally optimized for sparse data.
      Parameters:
      capacity - the initial capacity
      representation - the data representation
      Returns:
      the newly created token sequence.
    • moneyList

      public static MutableMoneyTokenSequence moneyList(int capacity, DataRepresentation representation)
      Creates a MutableMoneyTokenSequence with the specified capacity, optionally optimized for sparse data.
      Parameters:
      capacity - the initial capacity
      representation - the data representation
      Returns:
      the newly created token sequence.
    • numericList

      public static MutableNumericTokenSequence numericList(int capacity, DataRepresentation representation)
      Creates a MutableNumericTokenSequence with the specified capacity, optionally optimized for sparse data.
      Parameters:
      capacity - the initial capacity
      representation - the data representation
      Returns:
      the newly created token sequence.
    • objectList

      public static <O> MutableObjectTokenSequence<O> objectList(ObjectTokenType<O> type, int capacity, DataRepresentation representation)
      Creates a MutableObjectTokenSequence with the specified capacity, optionally optimized for sparse data.
      Type Parameters:
      O - the type of the elements of the sequence
      Parameters:
      type - the object type
      capacity - the initial capacity
      representation - the data representation
      Returns:
      the newly created token sequence.
    • periodList

      public static MutablePeriodTokenSequence periodList(int capacity, DataRepresentation representation)
      Creates a MutablePeriodTokenSequence with the specified capacity, optionally optimized for sparse data.
      Parameters:
      capacity - the initial capacity
      representation - the data representation
      Returns:
      the newly created token sequence.
    • stringList

      public static MutableStringTokenSequence stringList(int capacity, DataRepresentation representation)
      Creates a MutableStringTokenSequence with the specified capacity, optionally optimized for sparse data.
      Parameters:
      capacity - the initial capacity
      representation - the data representation
      Returns:
      the newly created token sequence.
    • timeList

      public static MutableTimeTokenSequence timeList(int capacity, DataRepresentation representation)
      Creates a MutableTimeTokenSequence with the specified capacity, optionally optimized for sparse data.
      Parameters:
      capacity - the initial capacity
      representation - the data representation
      Returns:
      the newly created token sequence.
    • timestampList

      public static MutableTimestampTokenSequence timestampList(int capacity, DataRepresentation representation)
      Creates a MutableTimestampTokenSequence with the specified capacity, optionally optimized for sparse data.
      Parameters:
      capacity - the initial capacity
      representation - the data representation
      Returns:
      the newly created token sequence.
    • recordList

      public static MutableRecordTokenSequence recordList(RecordTokenType type, int capacity, DataRepresentation representation)
      Creates a MutableRecordTokenSequence with the specified capacity, optionally optimized for sparse data.
      Parameters:
      type - the record type
      capacity - the initial capacity
      representation - the data representation
      Returns:
      the newly created token sequence.
    • allocateList

      public static MutableTokenSequence allocateList(TokenType type, int initialCapacity)
      Creates a MutableTokenSequence for tokens of the specified type.
      Parameters:
      type - the data type of tokens in the array
      initialCapacity - the initial capacity of the array
      Returns:
      a TokenArray of the appropriate type
    • allocateList

      public static MutableScalarTokenSequence allocateList(ScalarTokenType type, int initialCapacity)
      Creates a MutableTokenSequence for tokens of the specified scalar type.
      Parameters:
      type - the data type of tokens in the array
      initialCapacity - the initial capacity of the array
      Returns:
      a TokenArray of the appropriate type
    • allocateList

      public static MutableTokenSequence allocateList(TokenType type, int initialCapacity, DataRepresentation representation)
      Creates a MutableTokenSequence for tokens of the specified type.
      Parameters:
      type - the data type of tokens in the array
      initialCapacity - the initial capacity of the array
      representation - the data representation
      Returns:
      a TokenArray of the appropriate type
    • allocateList

      public static MutableScalarTokenSequence allocateList(ScalarTokenType type, int initialCapacity, DataRepresentation representation)
      Creates a MutableTokenSequence for tokens of the specified scalar type.
      Parameters:
      type - the data type of tokens in the array
      initialCapacity - the initial capacity of the array
      representation - the data representation
      Returns:
      a TokenArray of the appropriate type