Package com.ibm.fhir.path
Class FHIRPathAbstractTemporalValue
- java.lang.Object
-
- com.ibm.fhir.path.FHIRPathAbstractNode
-
- com.ibm.fhir.path.FHIRPathAbstractSystemValue
-
- com.ibm.fhir.path.FHIRPathAbstractTemporalValue
-
- All Implemented Interfaces:
FHIRPathNode,FHIRPathSystemValue,FHIRPathTemporalValue,Comparable<FHIRPathNode>
- Direct Known Subclasses:
FHIRPathDateTimeValue,FHIRPathDateValue,FHIRPathTimeValue
public abstract class FHIRPathAbstractTemporalValue extends FHIRPathAbstractSystemValue implements FHIRPathTemporalValue
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classFHIRPathAbstractTemporalValue.Builder
-
Field Summary
Fields Modifier and Type Field Description protected ChronoFieldprecisionprotected Temporaltemporalprotected TemporalAccessortemporalAccessorprotected Stringtext
-
Constructor Summary
Constructors Modifier Constructor Description protectedFHIRPathAbstractTemporalValue(FHIRPathAbstractTemporalValue.Builder builder)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract voidaccept(FHIRPathNodeVisitor visitor)A method for accepting aFHIRPathNodeVisitorabstract FHIRPathTemporalValueadd(FHIRPathQuantityValue quantityValue)Add a quantity value to this FHIRPathTemporalValueintcompareTo(FHIRPathNode other)protected intcompareTo(ZonedDateTime left, ZonedDateTime right)StringgetText()The text that this FHIRPathTemporalValue was parsed from (if applicable)booleanisComparableTo(FHIRPathNode other)Indicates whether this FHIRPathNode is comparable to the parameterabstract booleanisPartial()Indicates whether the date/time value wrapped by this FHIRPathTemporalValue node is partialbooleanisSupported(ChronoField field)Indicates whether the specified field is supported by this FHIRPathTemporalValueChronoFieldprecision()The precision of this FHIRPathTemporalValueabstract FHIRPathTemporalValuesubtract(FHIRPathQuantityValue quantityValue)Subtract a quantity value from this FHIRPathTemporalValueTemporaltemporal()TheTemporalvalue wrapped by this FHIRPathTemporalValueTemporalAccessortemporalAccessor()TheTemporalAcessorvalue wrapped by this FHIRPathTemporalValueabstract FHIRPathAbstractTemporalValue.BuildertoBuilder()Convert thisFHIRPathNodeinstance into aFHIRPathNode.Builderinstance-
Methods inherited from class com.ibm.fhir.path.FHIRPathAbstractSystemValue
children, descendants, getValue, hasValue, stream
-
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.ibm.fhir.path.FHIRPathNode
as, asElementNode, asResourceNode, asSystemValue, asTermServiceNode, asTypeInfoNode, children, descendants, getValue, is, isElementNode, isResourceNode, isTermServiceNode, isTypeInfoNode, name, path, stream, type
-
Methods inherited from interface com.ibm.fhir.path.FHIRPathSystemValue
asBooleanValue, asNumberValue, asQuantityValue, asStringValue, asTemporalValue, hasValue, isBooleanValue, isNumberValue, isQuantityValue, isStringValue, isSystemValue
-
Methods inherited from interface com.ibm.fhir.path.FHIRPathTemporalValue
asDateTimeValue, asDateValue, asTimeValue, isDateTimeValue, isDateValue, isTemporalValue, isTimeValue
-
-
-
-
Field Detail
-
temporalAccessor
protected final TemporalAccessor temporalAccessor
-
precision
protected final ChronoField precision
-
temporal
protected final Temporal temporal
-
text
protected final String text
-
-
Constructor Detail
-
FHIRPathAbstractTemporalValue
protected FHIRPathAbstractTemporalValue(FHIRPathAbstractTemporalValue.Builder builder)
-
-
Method Detail
-
temporalAccessor
public TemporalAccessor temporalAccessor()
Description copied from interface:FHIRPathTemporalValueTheTemporalAcessorvalue wrapped by this FHIRPathTemporalValue- Specified by:
temporalAccessorin interfaceFHIRPathTemporalValue- Returns:
- the
TemporalAccessorvalue wrapped by this FHIRPathTemporalValue
-
temporal
public Temporal temporal()
Description copied from interface:FHIRPathTemporalValueTheTemporalvalue wrapped by this FHIRPathTemporalValue- Specified by:
temporalin interfaceFHIRPathTemporalValue- Returns:
- the
Temporalvalue wrapped by this FHIRPathTemporalValue
-
precision
public ChronoField precision()
Description copied from interface:FHIRPathTemporalValueThe precision of this FHIRPathTemporalValue- Specified by:
precisionin interfaceFHIRPathTemporalValue- Returns:
- the precision of this FHIRPathTemporalValue
-
getText
public String getText()
Description copied from interface:FHIRPathTemporalValueThe text that this FHIRPathTemporalValue was parsed from (if applicable)- Specified by:
getTextin interfaceFHIRPathTemporalValue- Returns:
- the text that this FHIRPathTemporvalValue was parsed from (if applicable), otherwise null
-
isSupported
public boolean isSupported(ChronoField field)
Description copied from interface:FHIRPathTemporalValueIndicates whether the specified field is supported by this FHIRPathTemporalValue- Specified by:
isSupportedin interfaceFHIRPathTemporalValue- Parameters:
field- the field- Returns:
- true if the specified field is supported by this FHIRPathTemporalValue, otherwise false
-
isPartial
public abstract boolean isPartial()
Description copied from interface:FHIRPathTemporalValueIndicates whether the date/time value wrapped by this FHIRPathTemporalValue node is partial- Specified by:
isPartialin interfaceFHIRPathTemporalValue- Returns:
- true if the date/time value wrapped by this FHIRPathTemporalValue node is partial, otherwise false
-
add
public abstract FHIRPathTemporalValue add(FHIRPathQuantityValue quantityValue)
Description copied from interface:FHIRPathTemporalValueAdd a quantity value to this FHIRPathTemporalValue- Specified by:
addin interfaceFHIRPathTemporalValue- Parameters:
quantityValue- the quantity value to add- Returns:
- the result of adding a quantityValue to this FHIRPathTemporalValue
-
subtract
public abstract FHIRPathTemporalValue subtract(FHIRPathQuantityValue quantityValue)
Description copied from interface:FHIRPathTemporalValueSubtract a quantity value from this FHIRPathTemporalValue- Specified by:
subtractin interfaceFHIRPathTemporalValue- Parameters:
quantityValue- the quantity value to subtract- Returns:
- the result of subtracting a quantityValue from this FHIRPathTemporalValue
-
toBuilder
public abstract FHIRPathAbstractTemporalValue.Builder toBuilder()
Description copied from class:FHIRPathAbstractNodeConvert thisFHIRPathNodeinstance into aFHIRPathNode.Builderinstance- Specified by:
toBuilderin classFHIRPathAbstractSystemValue- Returns:
- a new
FHIRPathNode.Builderinstance containing the fields from thisFHIRPathNodeinstance
-
isComparableTo
public boolean isComparableTo(FHIRPathNode other)
Description copied from interface:FHIRPathNodeIndicates whether this FHIRPathNode is comparable to the parameter- Specified by:
isComparableToin interfaceFHIRPathNode- Parameters:
other- the other FHIRPathNode- Returns:
- true if this FHIRPathNode is comparable to the parameter, otherwise false
-
compareTo
public int compareTo(FHIRPathNode other)
- Specified by:
compareToin interfaceComparable<FHIRPathNode>
-
accept
public abstract void accept(FHIRPathNodeVisitor visitor)
Description copied from interface:FHIRPathNodeA method for accepting aFHIRPathNodeVisitor- Specified by:
acceptin interfaceFHIRPathNode- Parameters:
visitor- theFHIRPathNodeVisitorthat this FHIRPathNode is accepting
-
compareTo
protected int compareTo(ZonedDateTime left, ZonedDateTime right)
-
-