- java.lang.Object
-
- com.pervasive.datarush.sequences.TokenSequences
-
public class TokenSequences extends Object
Utilities for working with arrays of tokens.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static MutableScalarTokenSequence
allocateList(ScalarTokenType type, int initialCapacity)
Creates aMutableTokenSequence
for tokens of the specified scalar type.static MutableScalarTokenSequence
allocateList(ScalarTokenType type, int initialCapacity, DataRepresentation representation)
Creates aMutableTokenSequence
for tokens of the specified scalar type.static MutableTokenSequence
allocateList(TokenType type, int initialCapacity)
Creates aMutableTokenSequence
for tokens of the specified type.static MutableTokenSequence
allocateList(TokenType type, int initialCapacity, DataRepresentation representation)
Creates aMutableTokenSequence
for tokens of the specified type.static MutableBinaryTokenSequence
binaryList(int capacity, DataRepresentation representation)
Creates aMutableBinaryTokenSequence
with the specified capacity, optionally optimized for sparse data.static MutableBooleanTokenSequence
booleanList(int capacity, DataRepresentation representation)
Creates aMutableBooleanTokenSequence
with the specified capacity, optionally optimized for sparse data.static MutableCharTokenSequence
charList(int capacity, DataRepresentation representation)
Creates aMutableCharTokenSequence
with the specified capacity, optionally optimized for sparse data.static MutableDateTokenSequence
dateList(int capacity, DataRepresentation representation)
Creates aMutableDateTokenSequence
with the specified capacity, optionally optimized for sparse data.static MutableDoubleTokenSequence
doubleList(int capacity, DataRepresentation representation)
Creates aMutableDoubleTokenSequence
with the specified capacity, optionally optimized for sparse data.static MutableDurationTokenSequence
durationList(int capacity, DataRepresentation representation)
Creates aMutableDurationTokenSequence
with the specified capacity, optionally optimized for sparse data.static MutableFloatTokenSequence
floatList(int capacity, DataRepresentation representation)
Creates aMutableFloatTokenSequence
with the specified capacity, optionally optimized for sparse data.static MutableIntTokenSequence
intList(int capacity, DataRepresentation representation)
Creates aMutableIntTokenSequence
with the specified capacity, optionally optimized for sparse data.static MutableIp4AddressTokenSequence
ip4AddressList(int capacity, DataRepresentation representation)
Creates aMutableIp4AddressTokenSequence
with the specified capacity, optionally optimized for sparse data.static MutableIp6AddressTokenSequence
ip6AddressList(int capacity, DataRepresentation representation)
Creates aMutableIp6AddressTokenSequence
with the specified capacity, optionally optimized for sparse data.static MutableLongTokenSequence
longList(int capacity, DataRepresentation representation)
Creates aMutableLongTokenSequence
with the specified capacity, optionally optimized for sparse data.static MutableMoneyTokenSequence
moneyList(int capacity, DataRepresentation representation)
Creates aMutableMoneyTokenSequence
with the specified capacity, optionally optimized for sparse data.static MutableNumericTokenSequence
numericList(int capacity, DataRepresentation representation)
Creates aMutableNumericTokenSequence
with the specified capacity, optionally optimized for sparse data.static <O> MutableObjectTokenSequence<O>
objectList(ObjectTokenType<O> type, int capacity, DataRepresentation representation)
Creates aMutableObjectTokenSequence
with the specified capacity, optionally optimized for sparse data.static MutablePeriodTokenSequence
periodList(int capacity, DataRepresentation representation)
Creates aMutablePeriodTokenSequence
with the specified capacity, optionally optimized for sparse data.static MutableRecordTokenSequence
recordList(RecordTokenType type, int capacity, DataRepresentation representation)
Creates aMutableRecordTokenSequence
with the specified capacity, optionally optimized for sparse data.static MutableStringTokenSequence
stringList(int capacity, DataRepresentation representation)
Creates aMutableStringTokenSequence
with the specified capacity, optionally optimized for sparse data.static MutableTimeTokenSequence
timeList(int capacity, DataRepresentation representation)
Creates aMutableTimeTokenSequence
with the specified capacity, optionally optimized for sparse data.static MutableTimestampTokenSequence
timestampList(int capacity, DataRepresentation representation)
Creates aMutableTimestampTokenSequence
with the specified capacity, optionally optimized for sparse data.
-
-
-
Method Detail
-
binaryList
public static MutableBinaryTokenSequence binaryList(int capacity, DataRepresentation representation)
Creates aMutableBinaryTokenSequence
with the specified capacity, optionally optimized for sparse data.- Parameters:
capacity
- the initial capacityrepresentation
- the data representation- Returns:
- the newly created token sequence.
-
booleanList
public static MutableBooleanTokenSequence booleanList(int capacity, DataRepresentation representation)
Creates aMutableBooleanTokenSequence
with the specified capacity, optionally optimized for sparse data.- Parameters:
capacity
- the initial capacityrepresentation
- the data representation- Returns:
- the newly created token sequence.
-
charList
public static MutableCharTokenSequence charList(int capacity, DataRepresentation representation)
Creates aMutableCharTokenSequence
with the specified capacity, optionally optimized for sparse data.- Parameters:
capacity
- the initial capacityrepresentation
- the data representation- Returns:
- the newly created token sequence.
-
durationList
public static MutableDurationTokenSequence durationList(int capacity, DataRepresentation representation)
Creates aMutableDurationTokenSequence
with the specified capacity, optionally optimized for sparse data.- Parameters:
capacity
- the initial capacityrepresentation
- the data representation- Returns:
- the newly created token sequence.
-
dateList
public static MutableDateTokenSequence dateList(int capacity, DataRepresentation representation)
Creates aMutableDateTokenSequence
with the specified capacity, optionally optimized for sparse data.- Parameters:
capacity
- the initial capacityrepresentation
- the data representation- Returns:
- the newly created token sequence.
-
doubleList
public static MutableDoubleTokenSequence doubleList(int capacity, DataRepresentation representation)
Creates aMutableDoubleTokenSequence
with the specified capacity, optionally optimized for sparse data.- Parameters:
capacity
- the initial capacityrepresentation
- the data representation- Returns:
- the newly created token sequence.
-
floatList
public static MutableFloatTokenSequence floatList(int capacity, DataRepresentation representation)
Creates aMutableFloatTokenSequence
with the specified capacity, optionally optimized for sparse data.- Parameters:
capacity
- the initial capacityrepresentation
- the data representation- Returns:
- the newly created token sequence.
-
intList
public static MutableIntTokenSequence intList(int capacity, DataRepresentation representation)
Creates aMutableIntTokenSequence
with the specified capacity, optionally optimized for sparse data.- Parameters:
capacity
- the initial capacityrepresentation
- the data representation- Returns:
- the newly created token sequence.
-
ip4AddressList
public static MutableIp4AddressTokenSequence ip4AddressList(int capacity, DataRepresentation representation)
Creates aMutableIp4AddressTokenSequence
with the specified capacity, optionally optimized for sparse data.- Parameters:
capacity
- the initial capacityrepresentation
- the data representation- Returns:
- the newly created token sequence.
-
ip6AddressList
public static MutableIp6AddressTokenSequence ip6AddressList(int capacity, DataRepresentation representation)
Creates aMutableIp6AddressTokenSequence
with the specified capacity, optionally optimized for sparse data.- Parameters:
capacity
- the initial capacityrepresentation
- the data representation- Returns:
- the newly created token sequence.
-
longList
public static MutableLongTokenSequence longList(int capacity, DataRepresentation representation)
Creates aMutableLongTokenSequence
with the specified capacity, optionally optimized for sparse data.- Parameters:
capacity
- the initial capacityrepresentation
- the data representation- Returns:
- the newly created token sequence.
-
moneyList
public static MutableMoneyTokenSequence moneyList(int capacity, DataRepresentation representation)
Creates aMutableMoneyTokenSequence
with the specified capacity, optionally optimized for sparse data.- Parameters:
capacity
- the initial capacityrepresentation
- the data representation- Returns:
- the newly created token sequence.
-
numericList
public static MutableNumericTokenSequence numericList(int capacity, DataRepresentation representation)
Creates aMutableNumericTokenSequence
with the specified capacity, optionally optimized for sparse data.- Parameters:
capacity
- the initial capacityrepresentation
- the data representation- Returns:
- the newly created token sequence.
-
objectList
public static <O> MutableObjectTokenSequence<O> objectList(ObjectTokenType<O> type, int capacity, DataRepresentation representation)
Creates aMutableObjectTokenSequence
with the specified capacity, optionally optimized for sparse data.- Type Parameters:
O
- the type of the elements of the sequence- Parameters:
type
- the object typecapacity
- the initial capacityrepresentation
- the data representation- Returns:
- the newly created token sequence.
-
periodList
public static MutablePeriodTokenSequence periodList(int capacity, DataRepresentation representation)
Creates aMutablePeriodTokenSequence
with the specified capacity, optionally optimized for sparse data.- Parameters:
capacity
- the initial capacityrepresentation
- the data representation- Returns:
- the newly created token sequence.
-
stringList
public static MutableStringTokenSequence stringList(int capacity, DataRepresentation representation)
Creates aMutableStringTokenSequence
with the specified capacity, optionally optimized for sparse data.- Parameters:
capacity
- the initial capacityrepresentation
- the data representation- Returns:
- the newly created token sequence.
-
timeList
public static MutableTimeTokenSequence timeList(int capacity, DataRepresentation representation)
Creates aMutableTimeTokenSequence
with the specified capacity, optionally optimized for sparse data.- Parameters:
capacity
- the initial capacityrepresentation
- the data representation- Returns:
- the newly created token sequence.
-
timestampList
public static MutableTimestampTokenSequence timestampList(int capacity, DataRepresentation representation)
Creates aMutableTimestampTokenSequence
with the specified capacity, optionally optimized for sparse data.- Parameters:
capacity
- the initial capacityrepresentation
- the data representation- Returns:
- the newly created token sequence.
-
recordList
public static MutableRecordTokenSequence recordList(RecordTokenType type, int capacity, DataRepresentation representation)
Creates aMutableRecordTokenSequence
with the specified capacity, optionally optimized for sparse data.- Parameters:
type
- the record typecapacity
- the initial capacityrepresentation
- the data representation- Returns:
- the newly created token sequence.
-
allocateList
public static MutableTokenSequence allocateList(TokenType type, int initialCapacity)
Creates aMutableTokenSequence
for tokens of the specified type.- Parameters:
type
- the data type of tokens in the arrayinitialCapacity
- the initial capacity of the array- Returns:
- a
TokenArray
of the appropriate type
-
allocateList
public static MutableScalarTokenSequence allocateList(ScalarTokenType type, int initialCapacity)
Creates aMutableTokenSequence
for tokens of the specified scalar type.- Parameters:
type
- the data type of tokens in the arrayinitialCapacity
- 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 aMutableTokenSequence
for tokens of the specified type.- Parameters:
type
- the data type of tokens in the arrayinitialCapacity
- the initial capacity of the arrayrepresentation
- the data representation- Returns:
- a
TokenArray
of the appropriate type
-
allocateList
public static MutableScalarTokenSequence allocateList(ScalarTokenType type, int initialCapacity, DataRepresentation representation)
Creates aMutableTokenSequence
for tokens of the specified scalar type.- Parameters:
type
- the data type of tokens in the arrayinitialCapacity
- the initial capacity of the arrayrepresentation
- the data representation- Returns:
- a
TokenArray
of the appropriate type
-
-