Package com.ibm.fhir.path
Class FHIRPathTimeValue
- java.lang.Object
-
- com.ibm.fhir.path.FHIRPathAbstractNode
-
- com.ibm.fhir.path.FHIRPathAbstractSystemValue
-
- com.ibm.fhir.path.FHIRPathAbstractTemporalValue
-
- com.ibm.fhir.path.FHIRPathTimeValue
-
- All Implemented Interfaces:
FHIRPathNode,FHIRPathSystemValue,FHIRPathTemporalValue,java.lang.Comparable<FHIRPathNode>
public class FHIRPathTimeValue extends FHIRPathAbstractTemporalValue
AFHIRPathTemporalValuenode that wraps aLocalTimevalue
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classFHIRPathTimeValue.Builder
-
Field Summary
Fields Modifier and Type Field Description static java.time.format.DateTimeFormatterPARSER_FORMATTER-
Fields inherited from class com.ibm.fhir.path.FHIRPathAbstractTemporalValue
precision, temporal, temporalAccessor, text
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedFHIRPathTimeValue(FHIRPathTimeValue.Builder builder)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaccept(FHIRPathNodeVisitor visitor)A method for accepting aFHIRPathNodeVisitorFHIRPathTimeValueadd(FHIRPathQuantityValue quantityValue)Add a quantity value to this FHIRPathTemporalValuestatic FHIRPathTimeValue.Builderbuilder(java.time.LocalTime time, java.time.temporal.ChronoField precision)Static factory method for creating builder instances from aLocalTimevalue and a precisionbooleanequals(java.lang.Object obj)Indicates whether theLocalTimevalue wrapped by this FHIRPathTimeValue node is equal the parameter (or its primitive value)inthashCode()booleanisPartial()Indicates whether the date/time value wrapped by this FHIRPathTemporalValue node is partialbooleanisTimeValue()Indicates whether this FHIRPathTemporalValue is type compatible withFHIRPathTimeValueFHIRPathTimeValuesubtract(FHIRPathQuantityValue quantityValue)Subtract a quantity value from this FHIRPathTemporalValuejava.time.LocalTimetime()TheLocalTimevalue that is wrapped by this FHIRPathTimeValuestatic FHIRPathTimeValuetimeValue(java.lang.String text)Static factory method for creating FHIRPathTimeValue instances from aStringvaluestatic FHIRPathTimeValuetimeValue(java.lang.String name, java.time.LocalTime time)Static factory method for creating named FHIRPathTimeValue instances from aLocalTimevaluestatic FHIRPathTimeValuetimeValue(java.time.LocalTime time)Static factory method for creating FHIRPathTimeValue instances from aLocalTimevalueFHIRPathTimeValue.BuildertoBuilder()Convert thisFHIRPathNodeinstance into aFHIRPathNode.Builderinstancejava.lang.StringtoString()-
Methods inherited from class com.ibm.fhir.path.FHIRPathAbstractTemporalValue
compareTo, compareTo, getText, isComparableTo, isSupported, precision, temporal, temporalAccessor
-
Methods inherited from class com.ibm.fhir.path.FHIRPathAbstractSystemValue
children, descendants, getValue, hasValue, stream
-
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
-
-
-
-
Constructor Detail
-
FHIRPathTimeValue
protected FHIRPathTimeValue(FHIRPathTimeValue.Builder builder)
-
-
Method Detail
-
isTimeValue
public boolean isTimeValue()
Description copied from interface:FHIRPathTemporalValueIndicates whether this FHIRPathTemporalValue is type compatible withFHIRPathTimeValue- Returns:
- true if this FHIRPathTemporalValue is type compatible with
FHIRPathDateValue, otherwise false
-
isPartial
public boolean isPartial()
Description copied from interface:FHIRPathTemporalValueIndicates whether the date/time value wrapped by this FHIRPathTemporalValue node is partial- Specified by:
isPartialin interfaceFHIRPathTemporalValue- Specified by:
isPartialin classFHIRPathAbstractTemporalValue- Returns:
- true if the date/time value wrapped by this FHIRPathTemporalValue node is partial, otherwise false
-
time
public java.time.LocalTime time()
TheLocalTimevalue that is wrapped by this FHIRPathTimeValue- Returns:
- the
LocalTimevalue that is wrapped by this FHIRPathTimeValue
-
timeValue
public static FHIRPathTimeValue timeValue(java.lang.String text)
Static factory method for creating FHIRPathTimeValue instances from aStringvalue- Parameters:
text- the text that is parsed into aLocalTimevalue- Returns:
- a new FHIRPathTimeValue instance
-
timeValue
public static FHIRPathTimeValue timeValue(java.time.LocalTime time)
Static factory method for creating FHIRPathTimeValue instances from aLocalTimevalue- Parameters:
time- theLocalTimevalue- Returns:
- a new FHIRPathTimeValue instance
-
timeValue
public static FHIRPathTimeValue timeValue(java.lang.String name, java.time.LocalTime time)
Static factory method for creating named FHIRPathTimeValue instances from aLocalTimevalue- Parameters:
name- the nametime- theLocalTimevalue- Returns:
- a new named FHIRPathTimeValue instance
-
toBuilder
public FHIRPathTimeValue.Builder toBuilder()
Description copied from class:FHIRPathAbstractNodeConvert thisFHIRPathNodeinstance into aFHIRPathNode.Builderinstance- Specified by:
toBuilderin classFHIRPathAbstractTemporalValue- Returns:
- a new
FHIRPathNode.Builderinstance containing the fields from thisFHIRPathNodeinstance
-
builder
public static FHIRPathTimeValue.Builder builder(java.time.LocalTime time, java.time.temporal.ChronoField precision)
Static factory method for creating builder instances from aLocalTimevalue and a precision- Parameters:
time- theLocalTimevalueprecision- the precision- Returns:
- a new builder for building FHIRPathTimeValue instances
-
add
public FHIRPathTimeValue add(FHIRPathQuantityValue quantityValue)
Description copied from interface:FHIRPathTemporalValueAdd a quantity value to this FHIRPathTemporalValue- Specified by:
addin interfaceFHIRPathTemporalValue- Specified by:
addin classFHIRPathAbstractTemporalValue- Parameters:
quantityValue- the quantity value to add- Returns:
- the result of adding a quantityValue to this FHIRPathTemporalValue
-
subtract
public FHIRPathTimeValue subtract(FHIRPathQuantityValue quantityValue)
Description copied from interface:FHIRPathTemporalValueSubtract a quantity value from this FHIRPathTemporalValue- Specified by:
subtractin interfaceFHIRPathTemporalValue- Specified by:
subtractin classFHIRPathAbstractTemporalValue- Parameters:
quantityValue- the quantity value to subtract- Returns:
- the result of subtracting a quantityValue from this FHIRPathTemporalValue
-
equals
public boolean equals(java.lang.Object obj)
Indicates whether theLocalTimevalue wrapped by this FHIRPathTimeValue node is equal the parameter (or its primitive value)- Overrides:
equalsin classjava.lang.Object- Parameters:
obj- the otherObject- Returns:
- true if the date/time value wrapped by this FHIRPathTimeValue node is equal the parameter (or its primitive value), otherwise false
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
accept
public void accept(FHIRPathNodeVisitor visitor)
Description copied from interface:FHIRPathNodeA method for accepting aFHIRPathNodeVisitor- Specified by:
acceptin interfaceFHIRPathNode- Specified by:
acceptin classFHIRPathAbstractTemporalValue- Parameters:
visitor- theFHIRPathNodeVisitorthat this FHIRPathNode is accepting
-
-