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
,java.lang.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 class
FHIRPathAbstractTemporalValue.Builder
-
Field Summary
Fields Modifier and Type Field Description protected java.time.temporal.ChronoField
precision
protected java.time.temporal.Temporal
temporal
protected java.time.temporal.TemporalAccessor
temporalAccessor
protected java.lang.String
text
-
Constructor Summary
Constructors Modifier Constructor Description protected
FHIRPathAbstractTemporalValue(FHIRPathAbstractTemporalValue.Builder builder)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract void
accept(FHIRPathNodeVisitor visitor)
A method for accepting aFHIRPathNodeVisitor
abstract FHIRPathTemporalValue
add(FHIRPathQuantityValue quantityValue)
Add a quantity value to this FHIRPathTemporalValueint
compareTo(FHIRPathNode other)
protected int
compareTo(java.time.ZonedDateTime left, java.time.ZonedDateTime right)
java.lang.String
getText()
The text that this FHIRPathTemporalValue was parsed from (if applicable)boolean
isComparableTo(FHIRPathNode other)
Indicates whether this FHIRPathNode is comparable to the parameterabstract boolean
isPartial()
Indicates whether the date/time value wrapped by this FHIRPathTemporalValue node is partialboolean
isSupported(java.time.temporal.ChronoField field)
Indicates whether the specified field is supported by this FHIRPathTemporalValuejava.time.temporal.ChronoField
precision()
The precision of this FHIRPathTemporalValueabstract FHIRPathTemporalValue
subtract(FHIRPathQuantityValue quantityValue)
Subtract a quantity value from this FHIRPathTemporalValuejava.time.temporal.Temporal
temporal()
TheTemporal
value wrapped by this FHIRPathTemporalValuejava.time.temporal.TemporalAccessor
temporalAccessor()
TheTemporalAcessor
value wrapped by this FHIRPathTemporalValueabstract FHIRPathAbstractTemporalValue.Builder
toBuilder()
Convert thisFHIRPathNode
instance into aFHIRPathNode.Builder
instance-
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
-
-
-
-
Constructor Detail
-
FHIRPathAbstractTemporalValue
protected FHIRPathAbstractTemporalValue(FHIRPathAbstractTemporalValue.Builder builder)
-
-
Method Detail
-
temporalAccessor
public java.time.temporal.TemporalAccessor temporalAccessor()
Description copied from interface:FHIRPathTemporalValue
TheTemporalAcessor
value wrapped by this FHIRPathTemporalValue- Specified by:
temporalAccessor
in interfaceFHIRPathTemporalValue
- Returns:
- the
TemporalAccessor
value wrapped by this FHIRPathTemporalValue
-
temporal
public java.time.temporal.Temporal temporal()
Description copied from interface:FHIRPathTemporalValue
TheTemporal
value wrapped by this FHIRPathTemporalValue- Specified by:
temporal
in interfaceFHIRPathTemporalValue
- Returns:
- the
Temporal
value wrapped by this FHIRPathTemporalValue
-
precision
public java.time.temporal.ChronoField precision()
Description copied from interface:FHIRPathTemporalValue
The precision of this FHIRPathTemporalValue- Specified by:
precision
in interfaceFHIRPathTemporalValue
- Returns:
- the precision of this FHIRPathTemporalValue
-
getText
public java.lang.String getText()
Description copied from interface:FHIRPathTemporalValue
The text that this FHIRPathTemporalValue was parsed from (if applicable)- Specified by:
getText
in interfaceFHIRPathTemporalValue
- Returns:
- the text that this FHIRPathTemporvalValue was parsed from (if applicable), otherwise null
-
isSupported
public boolean isSupported(java.time.temporal.ChronoField field)
Description copied from interface:FHIRPathTemporalValue
Indicates whether the specified field is supported by this FHIRPathTemporalValue- Specified by:
isSupported
in 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:FHIRPathTemporalValue
Indicates whether the date/time value wrapped by this FHIRPathTemporalValue node is partial- Specified by:
isPartial
in 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:FHIRPathTemporalValue
Add a quantity value to this FHIRPathTemporalValue- Specified by:
add
in 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:FHIRPathTemporalValue
Subtract a quantity value from this FHIRPathTemporalValue- Specified by:
subtract
in 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:FHIRPathAbstractNode
Convert thisFHIRPathNode
instance into aFHIRPathNode.Builder
instance- Specified by:
toBuilder
in classFHIRPathAbstractSystemValue
- Returns:
- a new
FHIRPathNode.Builder
instance containing the fields from thisFHIRPathNode
instance
-
isComparableTo
public boolean isComparableTo(FHIRPathNode other)
Description copied from interface:FHIRPathNode
Indicates whether this FHIRPathNode is comparable to the parameter- Specified by:
isComparableTo
in 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:
compareTo
in interfacejava.lang.Comparable<FHIRPathNode>
-
accept
public abstract void accept(FHIRPathNodeVisitor visitor)
Description copied from interface:FHIRPathNode
A method for accepting aFHIRPathNodeVisitor
- Specified by:
accept
in interfaceFHIRPathNode
- Parameters:
visitor
- theFHIRPathNodeVisitor
that this FHIRPathNode is accepting
-
compareTo
protected int compareTo(java.time.ZonedDateTime left, java.time.ZonedDateTime right)
-
-