public final class DateTokenList extends AbstractScalarTokenSequence implements MutableDateTokenSequence
MutableDateTokenSequence.TokenTypeConstant.DATE| Constructor and Description |
|---|
DateTokenList(int initialCapacity)
Create an empty array
|
| Modifier and Type | Method and Description |
|---|---|
void |
append(CalendarDate value)
Appends the specified calendar date to this sequence.
|
void |
append(CalendarDate value,
int count)
Appends the specified calendar date to this sequence.
|
void |
append(Date value)
Appends the specified date to this sequence.
|
void |
append(Date value,
int count)
Appends the specified date to this sequence.
|
void |
appendEpochDays(long epochDays)
Appends the date specified as days elapsed since
January 1, 1970 00:00:00 GMT to this sequence.
|
void |
appendEpochDays(long epochDays,
int count)
Appends the date specified as days elapsed since
January 1, 1970 00:00:00 GMT to this sequence
multiple times.
|
void |
fillCalendarDate(int start,
int length,
CalendarDate value)
Sets the tokens in the specified subsequence to the
specified calendar date.
|
void |
fillDate(int start,
int length,
Date value)
Sets the tokens in the specified subsequence to a date value
specified as a
java.util.Date object, relative to the default time zone. |
void |
fillDate(int start,
int length,
Date value,
TimeZone tz)
Sets the tokens in the specified subsequence to a date value
specified as a
java.util.Date object, relative to the given time zone. |
void |
fillEpochDays(int start,
int length,
long days)
Sets the tokens in the specified subsequence to a date value
specified as the number of days since Java epoch (January 1, 1970 GMT).
|
void |
fillValue(int start,
int length,
TokenValued value)
Sets the tokens in the specified subsequence to the given value.
|
CalendarDate |
getCalendarDate(int index)
Gets the value of the specified token as
a calendar date.
|
Date |
getDate(int index)
Gets the value of the specified token as
a date.
|
Date |
getDate(int index,
TimeZone tz)
Gets the value of the specified token as
a date interpreted in the given timezone.
|
long |
getEpochDays(int index)
Get the value of the specified token as the number
of days elapsed since January 1, 1970 00:00:00 GMT.
|
DateValued |
getToken(int index)
Gets the value at the specified position.
|
DateSettable |
getTokenSetter(int index)
Returns a mutator for the given index.
|
ScalarTokenType |
getType()
Gets the data type of the tokens in the sequence.
|
void |
getValues(int index,
long[] values,
boolean[] nullFlags,
int offset,
int length)
Gets the values and null indicators for a range of tokens.
|
boolean |
isZero(int index)
Indicates whether the specified token has a zero value.
|
DateValuedIterator |
newValueIterator()
Creates an iterator over the non-null values of this sequence.
|
void |
setCalendarDate(int index,
CalendarDate value)
Sets the token at the specified position to the specified
calendar date.
|
void |
setDate(int index,
Date value)
Sets the token at the specified position to a date value specified as a
java.util.Date object, relative to the default time zone. |
void |
setDate(int index,
Date value,
TimeZone tz)
Sets the token at the specified position to a date value specified as a
java.util.Date object, relative to the given time zone. |
void |
setEpochDays(int index,
long days)
Sets the token at the specified position to a date value specified
as the number of days since Java epoch (January 1, 1970 GMT).
|
void |
setNull(int index)
Sets the token at the specified position to be null valued.
|
void |
setNull(int start,
int length)
Sets the tokens in the specified subsequence to be null valued.
|
void |
setValue(int index,
TokenValued value)
Sets the token at the specified position to the given value.
|
void |
setValues(int start,
TokenSequence values,
int offset,
int length)
Sets the tokens in the specified subsequence of the array
to the corresponding values from a subsequence of the given source
sequence.
|
void |
setZero(int index)
Sets the token at the specified position to be zero valued.
|
void |
setZero(int start,
int length)
Sets the tokens in the specified subsequence to be zero valued.
|
append, append, append, append, appendNull, appendNull, appendZero, appendZero, capacity, compareElement, compareElements, ensureCanonical, getElementComparator, getModificationCount, hashCode, isNull, isNull, map, remaining, reset, size, toString, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitensureCanonical, getModificationCountisNullappendNull, appendNull, appendZero, appendZero, resetcompareElement, compareElements, getElementComparator, hashCode, isNull, size, toStringappend, append, append, appendpublic DateTokenList(int initialCapacity)
initialCapacity - the initial capacity.public ScalarTokenType getType()
ScalarTokenSequencegetType in interface ScalarTokenSequencegetType in interface ScalarTypedgetType in interface TokenTypedpublic Date getDate(int index)
DateTokenSequencegetDate in interface DateTokenSequenceindex - the position of the token in the sequencenull
is returned.public Date getDate(int index, TimeZone tz)
DateTokenSequencegetDate in interface DateTokenSequenceindex - the index of the tokentz - the timezone relative to which to
interpret the date.null
is returned.public long getEpochDays(int index)
DateTokenSequencegetEpochDays in interface DateTokenSequenceindex - the index of the token0
is returned.public CalendarDate getCalendarDate(int index)
DateTokenSequencegetCalendarDate in interface DateTokenSequenceindex - the position of the token in the sequencenull
is returned.public DateValued getToken(int index)
TokenSequencegetToken in interface DateTokenSequencegetToken in interface ScalarTokenSequencegetToken in interface TokenSequenceindex - the index of the tokenpublic DateSettable getTokenSetter(int index)
MutableTokenSequencegetTokenSetter in interface MutableTokenSequencegetTokenSetter in interface MutableDateTokenSequencegetTokenSetter in interface MutableScalarTokenSequenceindex - the positionpublic void getValues(int index,
long[] values,
boolean[] nullFlags,
int offset,
int length)
DateTokenSequencegetValues in interface DateTokenSequenceindex - the starting index of the rangevalues - an array into which to place element values,
represented as epoch daysnullFlags - an array into which to place null indicator valuesoffset - the starting offset into the target arrays. That is,
elements[offset] and nulls[offset] will get the
value and null indicator respectively of the token at position
start, and so on.length - number of tokens to getDateTokenSequence.getEpochDays(int)public void setNull(int index)
MutableTokenSequencesetNull in interface MutableTokenSequenceindex - the position of the token in the arraypublic void setNull(int start,
int length)
MutableTokenSequencesetNull in interface MutableTokenSequencestart - the starting index of the subsequence in the arraylength - the length of the subsequencepublic void setZero(int index)
MutableTokenSequencesetZero in interface MutableTokenSequenceindex - the position of the token in the arraypublic void setZero(int start,
int length)
MutableTokenSequencesetZero in interface MutableTokenSequencestart - the starting index of the subsequence in the arraylength - the length of the subsequencepublic final boolean isZero(int index)
ScalarTokenSequenceisZero in interface ScalarTokenSequenceindex - the index of the tokentrue if the element is zero,
false otherwisepublic void setDate(int index,
Date value)
java.util.Date object, relative to the default time zone.
The time zone returned by TimeZone.getDefault() is used.index - the position of the token in the arrayvalue - the date value to which to set the token, expressed as a
point in time relative to the default time zone. Passing
null is equivalent to calling setNull(index}.public void fillDate(int start,
int length,
Date value)
java.util.Date object, relative to the default time zone.start - the starting index of the subsequence in the arraylength - the length of the subsequencevalue - the date value to which to set the tokens, expressed as a
point in time relative to the default time zone. Passing
null is equivalent to calling setNull(start, length}.public void setDate(int index,
Date value,
TimeZone tz)
java.util.Date object, relative to the given time zone.
The time zone returned by TimeZone.getDefault() is used.index - the position of the token in the arrayvalue - the date value to which to set the token, expressed as a
point in time relative to the specified time zone. Passing
null is equivalent to calling setNull(index}.tz - the time zone in which the date should be interpretedpublic void fillDate(int start,
int length,
Date value,
TimeZone tz)
java.util.Date object, relative to the given time zone.start - the starting index of the subsequence in the arraylength - the length of the subsequencevalue - the date value to which to set the tokens, expressed as a
point in time relative to the specified time zone. Passing
null is equivalent to calling setNull(start, length}.tz - the time zone in which the date should be interpretedpublic void setEpochDays(int index,
long days)
setEpochDays in interface MutableDateTokenSequencedays - date value to which to set the token, expressed as the
number of days since Java epochindex - the position to modifypublic void fillEpochDays(int start,
int length,
long days)
start - the starting index of the subsequence in the arraylength - the length of the subsequencedays - date value to which to set the token, expressed as the
number of days since Java epochpublic void setCalendarDate(int index,
CalendarDate value)
index - the position of the token in the arrayvalue - the calendar date to which to set the token. Passing
null is equivalent to calling setNull(index}.public void fillCalendarDate(int start,
int length,
CalendarDate value)
start - the starting index of the subsequence in the arraylength - the length of the subsequencevalue - the calendar date to which to set the tokens. Passing
null is equivalent to calling setNull(start, length}.public void setValue(int index,
TokenValued value)
MutableTokenSequencesetValue in interface MutableTokenSequenceindex - the position of the token in the arrayvalue - the value to which to set the token. This value
must be of an appropriate type for the array.public void fillValue(int start,
int length,
TokenValued value)
MutableTokenSequencefillValue in interface MutableTokenSequencestart - the starting index of the subsequence in the arraylength - the length of the subsequencevalue - the value to which to set the tokens. This value
must be of an appropriate type for the arraypublic void setValues(int start,
TokenSequence values,
int offset,
int length)
MutableTokenSequencesetValues in interface MutableTokenSequencestart - the starting index of the subsequence in the arrayvalues - the source sequence. This sequence must be
of an appropriate type for the array.offset - the starting index in the source sequence.
Corresponding values will be taken relative to this position.
That is, the value of the token at position offset in
values will be assigned to the token at position
start, and so on.length - the number of tokens to copypublic void append(Date value)
MutableDateTokenSequenceappend in interface MutableDateTokenSequencevalue - the value to append.public void append(Date value, int count)
MutableDateTokenSequenceappend in interface MutableDateTokenSequencevalue - the value to append.count - the number of copies to append.public void appendEpochDays(long epochDays)
MutableDateTokenSequenceappendEpochDays in interface MutableDateTokenSequenceepochDays - the value to append.public void appendEpochDays(long epochDays,
int count)
MutableDateTokenSequenceappendEpochDays in interface MutableDateTokenSequenceepochDays - the value to append.count - the number of copies to append.public void append(CalendarDate value)
MutableDateTokenSequenceappend in interface MutableDateTokenSequencevalue - the value to append.public void append(CalendarDate value, int count)
MutableDateTokenSequenceappend in interface MutableDateTokenSequencevalue - the value to append.count - the number of copies to append.public DateValuedIterator newValueIterator()
TokenSequencenewValueIterator in interface DateTokenSequencenewValueIterator in interface ScalarTokenSequencenewValueIterator in interface TokenSequenceCopyright © 2021 Actian Corporation. All rights reserved.