Package org.linuxforhealth.fhir.path
Class FHIRPathTimeValue
- java.lang.Object
-
- org.linuxforhealth.fhir.path.FHIRPathAbstractNode
-
- org.linuxforhealth.fhir.path.FHIRPathAbstractSystemValue
-
- org.linuxforhealth.fhir.path.FHIRPathAbstractTemporalValue
-
- org.linuxforhealth.fhir.path.FHIRPathTimeValue
-
- All Implemented Interfaces:
java.lang.Comparable<FHIRPathNode>
,FHIRPathNode
,FHIRPathSystemValue
,FHIRPathTemporalValue
public class FHIRPathTimeValue extends FHIRPathAbstractTemporalValue
AFHIRPathTemporalValue
node that wraps aLocalTime
value
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
FHIRPathTimeValue.Builder
-
Field Summary
Fields Modifier and Type Field Description static java.time.format.DateTimeFormatter
PARSER_FORMATTER
-
Fields inherited from class org.linuxforhealth.fhir.path.FHIRPathAbstractTemporalValue
precision, temporal, temporalAccessor, text
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
FHIRPathTimeValue(FHIRPathTimeValue.Builder builder)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
accept(FHIRPathNodeVisitor visitor)
A method for accepting aFHIRPathNodeVisitor
FHIRPathTimeValue
add(FHIRPathQuantityValue quantityValue)
Add a quantity value to this FHIRPathTemporalValuestatic FHIRPathTimeValue.Builder
builder(java.time.LocalTime time, java.time.temporal.ChronoField precision)
Static factory method for creating builder instances from aLocalTime
value and a precisionboolean
equals(java.lang.Object obj)
Indicates whether theLocalTime
value wrapped by this FHIRPathTimeValue node is equal the parameter (or its primitive value)int
hashCode()
boolean
isPartial()
Indicates whether the date/time value wrapped by this FHIRPathTemporalValue node is partialboolean
isTimeValue()
Indicates whether this FHIRPathTemporalValue is type compatible withFHIRPathTimeValue
FHIRPathTimeValue
subtract(FHIRPathQuantityValue quantityValue)
Subtract a quantity value from this FHIRPathTemporalValuejava.time.LocalTime
time()
TheLocalTime
value that is wrapped by this FHIRPathTimeValuestatic FHIRPathTimeValue
timeValue(java.lang.String text)
Static factory method for creating FHIRPathTimeValue instances from aString
valuestatic FHIRPathTimeValue
timeValue(java.lang.String path, java.lang.String name, java.time.LocalTime time)
Static factory method for creating named FHIRPathTimeValue instances from aLocalTime
valuestatic FHIRPathTimeValue
timeValue(java.time.LocalTime time)
Static factory method for creating FHIRPathTimeValue instances from aLocalTime
valueFHIRPathTimeValue.Builder
toBuilder()
Convert thisFHIRPathNode
instance into aFHIRPathNode.Builder
instancejava.lang.String
toString()
-
Methods inherited from class org.linuxforhealth.fhir.path.FHIRPathAbstractTemporalValue
compareTo, compareTo, getText, isComparableTo, isSupported, precision, temporal, temporalAccessor
-
Methods inherited from class org.linuxforhealth.fhir.path.FHIRPathAbstractSystemValue
children, descendants, stream
-
Methods inherited from class org.linuxforhealth.fhir.path.FHIRPathAbstractNode
as, getValue, hasValue, is, name, path, type
-
Methods inherited from interface org.linuxforhealth.fhir.path.FHIRPathNode
as, asElementNode, asResourceNode, asSystemValue, asTermServiceNode, asTypeInfoNode, children, descendants, is, isElementNode, isResourceNode, isTermServiceNode, isTypeInfoNode, name, path, stream, type
-
Methods inherited from interface org.linuxforhealth.fhir.path.FHIRPathSystemValue
asBooleanValue, asNumberValue, asQuantityValue, asStringValue, asTemporalValue, getValue, hasValue, isBooleanValue, isNumberValue, isQuantityValue, isStringValue, isSystemValue
-
Methods inherited from interface org.linuxforhealth.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:FHIRPathTemporalValue
Indicates 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:FHIRPathTemporalValue
Indicates whether the date/time value wrapped by this FHIRPathTemporalValue node is partial- Specified by:
isPartial
in interfaceFHIRPathTemporalValue
- Specified by:
isPartial
in classFHIRPathAbstractTemporalValue
- Returns:
- true if the date/time value wrapped by this FHIRPathTemporalValue node is partial, otherwise false
-
time
public java.time.LocalTime time()
TheLocalTime
value that is wrapped by this FHIRPathTimeValue- Returns:
- the
LocalTime
value that is wrapped by this FHIRPathTimeValue
-
timeValue
public static FHIRPathTimeValue timeValue(java.lang.String text)
Static factory method for creating FHIRPathTimeValue instances from aString
value- Parameters:
text
- the text that is parsed into aLocalTime
value- Returns:
- a new FHIRPathTimeValue instance
-
timeValue
public static FHIRPathTimeValue timeValue(java.time.LocalTime time)
Static factory method for creating FHIRPathTimeValue instances from aLocalTime
value- Parameters:
time
- theLocalTime
value- Returns:
- a new FHIRPathTimeValue instance
-
timeValue
public static FHIRPathTimeValue timeValue(java.lang.String path, java.lang.String name, java.time.LocalTime time)
Static factory method for creating named FHIRPathTimeValue instances from aLocalTime
value- Parameters:
path
- the path of the FHIRPathNodename
- the nametime
- theLocalTime
value- Returns:
- a new named FHIRPathTimeValue instance
-
toBuilder
public FHIRPathTimeValue.Builder toBuilder()
Description copied from class:FHIRPathAbstractNode
Convert thisFHIRPathNode
instance into aFHIRPathNode.Builder
instance- Specified by:
toBuilder
in classFHIRPathAbstractTemporalValue
- Returns:
- a new
FHIRPathNode.Builder
instance containing the fields from thisFHIRPathNode
instance
-
builder
public static FHIRPathTimeValue.Builder builder(java.time.LocalTime time, java.time.temporal.ChronoField precision)
Static factory method for creating builder instances from aLocalTime
value and a precision- Parameters:
time
- theLocalTime
valueprecision
- the precision- Returns:
- a new builder for building FHIRPathTimeValue instances
-
add
public FHIRPathTimeValue add(FHIRPathQuantityValue quantityValue)
Description copied from interface:FHIRPathTemporalValue
Add a quantity value to this FHIRPathTemporalValue- Specified by:
add
in interfaceFHIRPathTemporalValue
- Specified by:
add
in 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:FHIRPathTemporalValue
Subtract a quantity value from this FHIRPathTemporalValue- Specified by:
subtract
in interfaceFHIRPathTemporalValue
- Specified by:
subtract
in 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 theLocalTime
value wrapped by this FHIRPathTimeValue node is equal the parameter (or its primitive value)- Overrides:
equals
in 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:
hashCode
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
accept
public void accept(FHIRPathNodeVisitor visitor)
Description copied from interface:FHIRPathNode
A method for accepting aFHIRPathNodeVisitor
- Specified by:
accept
in interfaceFHIRPathNode
- Specified by:
accept
in classFHIRPathAbstractTemporalValue
- Parameters:
visitor
- theFHIRPathNodeVisitor
that this FHIRPathNode is accepting
-
-