Package org.linuxforhealth.fhir.path
Class FHIRPathStringValue
- java.lang.Object
 - 
- org.linuxforhealth.fhir.path.FHIRPathAbstractNode
 - 
- org.linuxforhealth.fhir.path.FHIRPathAbstractSystemValue
 - 
- org.linuxforhealth.fhir.path.FHIRPathStringValue
 
 
 
 
- 
- All Implemented Interfaces:
 java.lang.Comparable<FHIRPathNode>,FHIRPathNode,FHIRPathSystemValue
public class FHIRPathStringValue extends FHIRPathAbstractSystemValue
AFHIRPathSystemValuenode that wraps aStringvalue 
- 
- 
Nested Class Summary
Nested Classes Modifier and Type Class Description static classFHIRPathStringValue.Builder 
- 
Field Summary
Fields Modifier and Type Field Description static FHIRPathStringValueEMPTY_STRING 
- 
Constructor Summary
Constructors Modifier Constructor Description protectedFHIRPathStringValue(FHIRPathStringValue.Builder builder) 
- 
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaccept(FHIRPathNodeVisitor visitor)A method for accepting aFHIRPathNodeVisitorstatic FHIRPathStringValue.Builderbuilder(java.lang.String string)Static factory method for creating builder instances from aStringvalueintcompareTo(FHIRPathNode other)Compare theStringvalue wrapped by this FHIRPathStringValue node to the parameterFHIRPathStringValueconcat(FHIRPathStringValue value)Concatenate theStringvalue with theStringvalue wrapped by another FHIRPathStringValuebooleancontains(FHIRPathStringValue substring)Indicates whether this FHIRPathStringValue contains the substring in the parameterbooleanendsWith(FHIRPathStringValue suffix)Indicates whether this FHIRPathStringValue ends with the suffix in the parameterbooleanequals(java.lang.Object obj)Indicates whether theStringvalue wrapped by this FHIRPathStringValue node is equal the parameter (or its primitive value)inthashCode()booleanisComparableTo(FHIRPathNode other)Indicates whether this FHIRPathStringValue is comparable to the parameterbooleanisStringValue()Indicates whether this FHIRPathSystemValue is type compatible withFHIRPathStringValueintlength()The length of this FHIRPathStringValueFHIRPathStringValuelower()Convert the characters in this FHIRPathStringValue to lower casebooleanmatches(FHIRPathStringValue regex)Indicates whether theStringvalue wrapped by this FHIRPathStringValue matches the regex in the parameterFHIRPathStringValuereplace(FHIRPathStringValue pattern, FHIRPathStringValue substitution)Replace occurrences of pattern in this FHIRPathStringValue with substitutionFHIRPathStringValuereplaceMatches(FHIRPathStringValue regex, FHIRPathStringValue substitution)Replace matches of regex in this FHIRPathStringValue with substitutionbooleanstartsWith(FHIRPathStringValue prefix)Indicates whether this FHIRPathStringValue starts with the prefix in the parameterjava.lang.Stringstring()TheStringvalue wrapped by this FHIRPathStringValuestatic FHIRPathStringValuestringValue(java.lang.String string)Static factory method for creating FHIRPathStringValue instances from aStringvaluestatic FHIRPathStringValuestringValue(java.lang.String path, java.lang.String name, java.lang.String string)Static factory method for creating named FHIRPathStringValue instances from aStringvalueFHIRPathStringValuesubstring(int start)Returns the part of this FHIRPathStringValue starting at position startFHIRPathStringValuesubstring(int start, int length)Returns the part of this FHIRPathStringValue starting at position start up to length number of charactersFHIRPathStringValue.BuildertoBuilder()Convert thisFHIRPathNodeinstance into aFHIRPathNode.Builderinstancejava.lang.StringtoString()FHIRPathStringValueupper()Convert the characters in this FHIRPathStringValue to upper case- 
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, is, isElementNode, isResourceNode, isTermServiceNode, isTypeInfoNode, name, path, type 
- 
Methods inherited from interface org.linuxforhealth.fhir.path.FHIRPathSystemValue
asBooleanValue, asNumberValue, asQuantityValue, asStringValue, asTemporalValue, getValue, hasValue, isBooleanValue, isNumberValue, isQuantityValue, isSystemValue, isTemporalValue 
 - 
 
 - 
 
- 
- 
Field Detail
- 
EMPTY_STRING
public static final FHIRPathStringValue EMPTY_STRING
 
 - 
 
- 
Constructor Detail
- 
FHIRPathStringValue
protected FHIRPathStringValue(FHIRPathStringValue.Builder builder)
 
 - 
 
- 
Method Detail
- 
isStringValue
public boolean isStringValue()
Description copied from interface:FHIRPathSystemValueIndicates whether this FHIRPathSystemValue is type compatible withFHIRPathStringValue- Returns:
 - true if this FHIRPathSystemValue is type compatible with 
FHIRPathStringValue, otherwise false 
 
- 
string
public java.lang.String string()
TheStringvalue wrapped by this FHIRPathStringValue- Returns:
 - the 
Stringvalue wrapped by this FHIRPathStringValue 
 
- 
stringValue
public static FHIRPathStringValue stringValue(java.lang.String string)
Static factory method for creating FHIRPathStringValue instances from aStringvalue- Parameters:
 string- theStringvalue- Returns:
 - a new FHIRPathStringValue instance
 
 
- 
stringValue
public static FHIRPathStringValue stringValue(java.lang.String path, java.lang.String name, java.lang.String string)
Static factory method for creating named FHIRPathStringValue instances from aStringvalue- Parameters:
 path- the path of the FHIRPathNodename- the namestring- theStringvalue- Returns:
 - a new named FHIRPathStringValue instance
 
 
- 
toBuilder
public FHIRPathStringValue.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 
 
- 
builder
public static FHIRPathStringValue.Builder builder(java.lang.String string)
Static factory method for creating builder instances from aStringvalue- Parameters:
 string- theStringvalue- Returns:
 - a new builder for building FHIRPathStringValue instances
 
 
- 
concat
public FHIRPathStringValue concat(FHIRPathStringValue value)
Concatenate theStringvalue with theStringvalue wrapped by another FHIRPathStringValue- Parameters:
 value- the other FHIRPathStringValue- Returns:
 - the result of concatenation between this FHIRPathStringValue and the parameter
 
 
- 
startsWith
public boolean startsWith(FHIRPathStringValue prefix)
Indicates whether this FHIRPathStringValue starts with the prefix in the parameter- Parameters:
 prefix- the prefix- Returns:
 - true if this FHIRPathStringValue starts with the parameter, otherwise false
 
 
- 
endsWith
public boolean endsWith(FHIRPathStringValue suffix)
Indicates whether this FHIRPathStringValue ends with the suffix in the parameter- Parameters:
 suffix- the suffix- Returns:
 - true if this FHIRPathStringValue ends with the parameter, otherwise false
 
 
- 
replace
public FHIRPathStringValue replace(FHIRPathStringValue pattern, FHIRPathStringValue substitution)
Replace occurrences of pattern in this FHIRPathStringValue with substitution- Parameters:
 pattern- the patternsubstitution- the substitution- Returns:
 - the result of replacing occurrences of pattern found in this FHIRPathStringValue with substitution
 
 
- 
matches
public boolean matches(FHIRPathStringValue regex)
Indicates whether theStringvalue wrapped by this FHIRPathStringValue matches the regex in the parameter- Parameters:
 regex- the regex- Returns:
 - true if the 
Stringvalue wrapped by this FHIRPathStringValue matches the regex in the parameter 
 
- 
replaceMatches
public FHIRPathStringValue replaceMatches(FHIRPathStringValue regex, FHIRPathStringValue substitution)
Replace matches of regex in this FHIRPathStringValue with substitution- Parameters:
 regex- the regexsubstitution- the substitution- Returns:
 - the result of replacing matches of regex in this FHIRPathStringValue with substitution
 
 
- 
substring
public FHIRPathStringValue substring(int start)
Returns the part of this FHIRPathStringValue starting at position start- Parameters:
 start- the start- Returns:
 - the part of this FHIRPathStringValue starting at position start
 
 
- 
substring
public FHIRPathStringValue substring(int start, int length)
Returns the part of this FHIRPathStringValue starting at position start up to length number of characters- Parameters:
 start- the startlength- the length- Returns:
 - the part of this FHIRPathStringValue starting at position start up to length number of characters
 
 
- 
contains
public boolean contains(FHIRPathStringValue substring)
Indicates whether this FHIRPathStringValue contains the substring in the parameter- Parameters:
 substring- the substring- Returns:
 - true if this FHIRPathStringValue contains the substring in the parameter, otherwise false
 
 
- 
length
public int length()
The length of this FHIRPathStringValue- Returns:
 - the length of this FHIRPathStringValue
 
 
- 
lower
public FHIRPathStringValue lower()
Convert the characters in this FHIRPathStringValue to lower case- Returns:
 - the result of converting the characters in this FHIRPathString to lower case
 
 
- 
upper
public FHIRPathStringValue upper()
Convert the characters in this FHIRPathStringValue to upper case- Returns:
 - the result of converting the characters in this FHIRPathString to upper case
 
 
- 
isComparableTo
public boolean isComparableTo(FHIRPathNode other)
Indicates whether this FHIRPathStringValue is comparable to the parameter- Parameters:
 other- the other FHIRPathNode- Returns:
 - true if the parameter or its primitive value is a 
FHIRPathStringValue, otherwise false 
 
- 
compareTo
public int compareTo(FHIRPathNode other)
Compare theStringvalue wrapped by this FHIRPathStringValue node to the parameter- Parameters:
 other- the otherFHIRPathNode- Returns:
 - 0 if the 
Stringvalue wrapped by this FHIRPathStringValue node is equal to the parameter; a positive value if this FHIRPathStringValue if the first non-matching character is greater than the character at the same index in the parameter; a positive value if this FHIRPathStringValue if the first non-matching character is less than the character at the same index in the parameter 
 
- 
equals
public boolean equals(java.lang.Object obj)
Indicates whether theStringvalue wrapped by this FHIRPathStringValue node is equal the parameter (or its primitive value)- Overrides:
 equalsin classjava.lang.Object- Parameters:
 obj- the otherObject- Returns:
 - true if the 
Stringvalue wrapped by this FHIRPathStringValue 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- Parameters:
 visitor- theFHIRPathNodeVisitorthat this FHIRPathNode is accepting
 
 - 
 
 -