Class EpochDateTime
java.lang.Object
se.kuseman.payloadbuilder.api.execution.EpochDateTime
- All Implemented Interfaces:
Comparable<EpochDateTime>,ValueVector
Data type class for
Column.Type.DateTime. Uses a long UTC epoch for internal storage/comparison.-
Nested Class Summary
Nested classes/interfaces inherited from interface se.kuseman.payloadbuilder.api.execution.ValueVector
ValueVector.LiteralValueVector -
Field Summary
Fields inherited from interface se.kuseman.payloadbuilder.api.execution.ValueVector
EMPTY_VECTOR_BY_TYPE, FALSE_VECTORS, ONE_SIZE_NULL_VECTOR_BY_TYPE, TRUE_VECTORS -
Method Summary
Modifier and TypeMethodDescriptionadd(long amount, TemporalUnit unit) Add a temporal unit to this datetime returning a new instanceintbooleanstatic EpochDateTimefrom(long epoch) Creates a epoch date time from provided long unix epochstatic EpochDateTimeTry to convert provided object to a epoch date timestatic EpochDateTimeCreate an epoch date time from provided string.getDateTime(int row) Get date time at provided rowlonggetEpoch()Return this instance inLocalDateTimelonggetPart(ChronoField unit) Get a part of this date timeinthashCode()booleanisNull(int row) Return if value at provided row is nullstatic EpochDateTimenow()Creates a epoch date time with now instantintsize()Return size of vectorConvert this datetime to offset with provided zonetoString()type()Return type of vector valuesMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface se.kuseman.payloadbuilder.api.execution.ValueVector
getAny, getArray, getBoolean, getCardinality, getDateTimeOffset, getDecimal, getDouble, getFloat, getInt, getLong, getObject, getPredicateBoolean, getString, getTable, toCsv, toCsv, valueAsObject, valueAsString
-
Method Details
-
size
public int size()Description copied from interface:ValueVectorReturn size of vector- Specified by:
sizein interfaceValueVector
-
type
Description copied from interface:ValueVectorReturn type of vector values- Specified by:
typein interfaceValueVector
-
isNull
public boolean isNull(int row) Description copied from interface:ValueVectorReturn if value at provided row is null- Specified by:
isNullin interfaceValueVector
-
getDateTime
Description copied from interface:ValueVectorGet date time at provided row- Specified by:
getDateTimein interfaceValueVector
-
getEpoch
public long getEpoch() -
toOffset
Convert this datetime to offset with provided zone -
getLocalDateTime
Return this instance inLocalDateTime -
getPart
Get a part of this date time -
add
Add a temporal unit to this datetime returning a new instance -
compareTo
- Specified by:
compareToin interfaceComparable<EpochDateTime>
-
hashCode
public int hashCode() -
equals
-
toString
-
now
Creates a epoch date time with now instant -
from
Creates a epoch date time from provided long unix epoch -
from
Create an epoch date time from provided string. -
from
Try to convert provided object to a epoch date time
-