Package com.ibm.fhir.path
Class FHIRPathDateValue
- java.lang.Object
-
- com.ibm.fhir.path.FHIRPathAbstractNode
-
- com.ibm.fhir.path.FHIRPathAbstractTemporalValue
-
- com.ibm.fhir.path.FHIRPathDateValue
-
- All Implemented Interfaces:
FHIRPathNode
,FHIRPathSystemValue
,FHIRPathTemporalValue
,Comparable<FHIRPathNode>
public class FHIRPathDateValue extends FHIRPathAbstractTemporalValue
A node that wraps aTemporalAccessor
date value
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
FHIRPathDateValue.Builder
-
Field Summary
Fields Modifier and Type Field Description static DateTimeFormatter
PARSER_FORMATTER
-
Fields inherited from class com.ibm.fhir.path.FHIRPathAbstractTemporalValue
precision, temporal, temporalAccessor, text
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
FHIRPathDateValue(FHIRPathDateValue.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
FHIRPathDateValue
add(FHIRPathQuantityValue quantityValue)
Add a quantity value to this FHIRPathTemporalValuestatic FHIRPathDateValue.Builder
builder(TemporalAccessor date, ChronoField precision)
Static factory method for creating builder instances from aTemporalAccessor
date value and a precisionTemporalAccessor
date()
The date value wrapped by this FHIRPathDateValue nodestatic FHIRPathDateValue
dateValue(String text)
Static factory method for creating FHIRPathDateValue instances from aString
valuestatic FHIRPathDateValue
dateValue(String name, TemporalAccessor date)
Static factory method for creating named FHIRPathDateValue instances from aTemporalAccessor
date valuestatic FHIRPathDateValue
dateValue(TemporalAccessor date)
Static factory method for creating FHIRPathDateValue instances from aTemporalAccessor
date valueboolean
equals(Object obj)
Indicates whether the date value wrapped by this FHIRPathDateValue node is equal the parameter (or its primitive value)int
hashCode()
boolean
isDateValue()
Indicates whether this FHIRPathTemporalValue is type compatible withFHIRPathDateValue
boolean
isPartial()
Indicates whether the date/time value wrapped by this FHIRPathTemporalValue node is partialFHIRPathDateValue
subtract(FHIRPathQuantityValue quantityValue)
Subtract a quantity value from this FHIRPathTemporalValueFHIRPathDateValue.Builder
toBuilder()
Convert thisFHIRPathNode
instance into aFHIRPathNode.Builder
instanceString
toString()
-
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.FHIRPathAbstractNode
as, children, descendants, getValue, hasValue, is, name, path, stream, type
-
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, isTemporalValue, isTimeValue
-
-
-
-
Field Detail
-
PARSER_FORMATTER
public static final DateTimeFormatter PARSER_FORMATTER
-
-
Constructor Detail
-
FHIRPathDateValue
protected FHIRPathDateValue(FHIRPathDateValue.Builder builder)
-
-
Method Detail
-
isDateValue
public boolean isDateValue()
Description copied from interface:FHIRPathTemporalValue
Indicates whether this FHIRPathTemporalValue is type compatible withFHIRPathDateValue
- 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
-
date
public TemporalAccessor date()
The date value wrapped by this FHIRPathDateValue node- Returns:
- the date value wrapped by this FHIRPathDateValue node
-
dateValue
public static FHIRPathDateValue dateValue(String text)
Static factory method for creating FHIRPathDateValue instances from aString
value- Parameters:
text
- the text that is parsed into aTemporalAccessor
date value- Returns:
- a new FHIRPathDateValue instance
-
dateValue
public static FHIRPathDateValue dateValue(TemporalAccessor date)
Static factory method for creating FHIRPathDateValue instances from aTemporalAccessor
date value- Parameters:
dateTime
- theTemporalAccessor
date value- Returns:
- a new FHIRPathDateValue instance
-
dateValue
public static FHIRPathDateValue dateValue(String name, TemporalAccessor date)
Static factory method for creating named FHIRPathDateValue instances from aTemporalAccessor
date value- Parameters:
name
- the namedateTime
- theTemporalAccessor
date value- Returns:
- a new named FHIRPathDateValue instance
-
toBuilder
public FHIRPathDateValue.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 FHIRPathDateValue.Builder builder(TemporalAccessor date, ChronoField precision)
Static factory method for creating builder instances from aTemporalAccessor
date value and a precision- Parameters:
date
- theTemporalAccessor
date valueprecision
- the precision- Returns:
- a new builder for building FHIRPathDateValue instances
-
add
public FHIRPathDateValue 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 FHIRPathDateValue 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(Object obj)
Indicates whether the date value wrapped by this FHIRPathDateValue node is equal the parameter (or its primitive value)
-
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
-
-