Module datarush.library
Interface MutableBinaryTokenSequence
-
- All Superinterfaces:
BinaryTokenSequence
,MutableScalarTokenSequence
,MutableTokenSequence
,ScalarTokenAppendable
,ScalarTokenSequence
,ScalarTyped
,TokenAppendable
,TokenSequence
,TokenTyped
- All Known Implementing Classes:
BinaryTokenList
,SparseBinaryTokenList
public interface MutableBinaryTokenSequence extends BinaryTokenSequence, MutableScalarTokenSequence
AMutableTokenSequence
containing binary valued data.- See Also:
TokenTypeConstant#BINARY
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
append(byte[] value)
Appends the specified binary value to this sequence.void
append(byte[] value, int count)
Appends the specified binary value to this sequence multiple times.void
appendReference(byte[] value)
Appends the specified binary value to this sequence.void
appendReference(byte[] value, int count)
Appends the specified binary value to this sequence multiple times.BinarySettable
getTokenSetter(int index)
Returns a mutator for the given index.void
set(int index, byte[] value)
Sets the token at the specified position to the given binary value.void
setRef(int index, byte[] value)
Sets the token at the specified position to the given byte array reference.-
Methods inherited from interface com.pervasive.datarush.sequences.scalar.BinaryTokenSequence
getBinary, getBinaryRef, getToken, getValues, newValueIterator
-
Methods inherited from interface com.pervasive.datarush.sequences.scalar.MutableScalarTokenSequence
ensureCanonical, getModificationCount
-
Methods inherited from interface com.pervasive.datarush.sequences.MutableTokenSequence
appendNull, appendNull, appendZero, appendZero, fillValue, reset, setNull, setNull, setValue, setValues, setZero, setZero
-
Methods inherited from interface com.pervasive.datarush.sequences.scalar.ScalarTokenSequence
getType, isNull, isZero
-
Methods inherited from interface com.pervasive.datarush.sequences.TokenAppendable
append, append, append, append
-
Methods inherited from interface com.pervasive.datarush.sequences.TokenSequence
compareElement, compareElements, getElementComparator, hashCode, isNull, size, toString
-
-
-
-
Method Detail
-
append
void append(byte[] value)
Appends the specified binary value to this sequence.A copy of the input will be made.
- Parameters:
value
- the value to append. Ifnull
, this is equivalent toappendNull()
.
-
appendReference
void appendReference(byte[] value)
Appends the specified binary value to this sequence.A reference to the input value will be stored; subsequent modification of the input modifies the stored value.
- Parameters:
value
- the value to append. Ifnull
, this is equivalent toappendNull()
.
-
append
void append(byte[] value, int count)
Appends the specified binary value to this sequence multiple times.A copy of the input will be made.
- Parameters:
value
- the value to append. Ifnull
, this is equivalent toappendNull(count)
.count
- the number of copies to append.
-
appendReference
void appendReference(byte[] value, int count)
Appends the specified binary value to this sequence multiple times.A reference to the input value will be stored; subsequent modification of the input modifies the stored value.
- Parameters:
value
- the value to append. Ifnull
, this is equivalent toappendNull(count)
.count
- the number of copies to append.
-
set
void set(int index, byte[] value)
Sets the token at the specified position to the given binary value.The input array is copied to prevent later modification of the value that is set. To avoid this overhead and prevent the data copy, use the
setRef(int,byte[])
method instead.- Parameters:
index
- the position of the token in the arrayvalue
- the binary value to which to set the token. Passingnull
is equivalent to callingsetNull(index)
.
-
setRef
void setRef(int index, byte[] value)
Sets the token at the specified position to the given byte array reference.While this call avoids the overhead seen with
set(int,byte[])
, subsequent modification of the value will modify the token value in the array.- Parameters:
index
- the position of the token in the arrayvalue
- the binary value to which to set the token. Passingnull
is equivalent to callingsetNull(index)
.
-
getTokenSetter
BinarySettable getTokenSetter(int index)
Description copied from interface:MutableTokenSequence
Returns a mutator for the given index.- Specified by:
getTokenSetter
in interfaceMutableScalarTokenSequence
- Specified by:
getTokenSetter
in interfaceMutableTokenSequence
- Parameters:
index
- the position- Returns:
- a mutator for the given index.
-
-