public abstract class TemporalType<T> extends AbstractType<T>
AbstractType.ComparisonType
AssignmentTestable.TestResult
comparisonType, isByteOrderComparable, reverseComparator
Modifier | Constructor and Description |
---|---|
protected |
TemporalType(AbstractType.ComparisonType comparisonType) |
Modifier and Type | Method and Description |
---|---|
java.nio.ByteBuffer |
addDuration(java.nio.ByteBuffer temporal,
java.nio.ByteBuffer duration)
Adds the duration to the specified value.
|
java.nio.ByteBuffer |
fromTimeInMillis(long timeInMillis)
Returns the temporal value corresponding to the specified UNIX timestamp.
|
java.nio.ByteBuffer |
now()
Returns the current temporal value.
|
java.nio.ByteBuffer |
substractDuration(java.nio.ByteBuffer temporal,
java.nio.ByteBuffer duration)
Substract the duration from the specified value.
|
long |
toTimeInMillis(java.nio.ByteBuffer value)
Converts this temporal in UNIX timestamp.
|
protected void |
validateDuration(Duration duration)
Validates that the duration has the correct precision.
|
asCQL3Type, asCQLTypeStringList, checkComparable, compare, compareCollectionMembers, compareCustom, compareForCQL, componentsCount, compose, decompose, expandUserTypes, freeze, freezeNestedMulticellTypes, fromJSONObject, fromString, getComponents, getSerializer, getString, getString, isCollection, isCompatibleWith, isCounter, isEmptyValueMeaningless, isFreezable, isFrozenCollection, isMultiCell, isReversed, isTuple, isUDT, isValueCompatibleWith, isValueCompatibleWithInternal, parseDefaultParameters, readValue, readValue, referencesDuration, referencesUserType, skipValue, subTypes, testAssignment, testAssignment, toJSONString, toString, toString, validate, validateCellValue, validateCollectionMember, valueLengthIfFixed, withUpdatedUserType, writeValue, writtenLength
protected TemporalType(AbstractType.ComparisonType comparisonType)
public java.nio.ByteBuffer now()
public long toTimeInMillis(java.nio.ByteBuffer value)
value
- the temporal value.public java.nio.ByteBuffer fromTimeInMillis(long timeInMillis)
timeInMillis
- the UNIX timestamp to convertpublic java.nio.ByteBuffer addDuration(java.nio.ByteBuffer temporal, java.nio.ByteBuffer duration)
temporal
- the value to add toduration
- the duration to addpublic java.nio.ByteBuffer substractDuration(java.nio.ByteBuffer temporal, java.nio.ByteBuffer duration)
temporal
- the value to substract fromduration
- the duration to substractprotected void validateDuration(Duration duration)
duration
- the duration to validate.Copyright © 2009-2020 The Apache Software Foundation