Class CompareValue
- java.lang.Object
-
- de.captaingoldfish.scim.sdk.server.filter.antlr.CompareValue
-
public class CompareValue extends Object
author Pascal Knueppel
created at: 16.10.2019 - 12:39
this class contains the value of anAttributeExpressionLeaf. It is used to check what type of value was parsed and to get the value in the desired type
-
-
Constructor Summary
Constructors Constructor Description CompareValue(ScimFilterParser.CompareValueContext compareValueContext, SchemaAttribute schemaAttribute)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Optional<Boolean>getBooleanValue()Optional<Instant>getDateTime()Optional<BigDecimal>getNumberValue()Optional<String>getStringValue()booleanisBoolean()booleanisDateTime()booleanisNull()booleanisNumber()booleanisString()StringtoString()
-
-
-
Constructor Detail
-
CompareValue
public CompareValue(ScimFilterParser.CompareValueContext compareValueContext, SchemaAttribute schemaAttribute)
- Parameters:
compareValueContext- the antlr context for this valueschemaAttribute- the attributes meta information
-
-
Method Detail
-
isNull
public boolean isNull()
- Returns:
- if this value is null
-
isNumber
public boolean isNumber()
- Returns:
- if this value is a parsable number
-
isString
public boolean isString()
- Returns:
- if this value is a string value. String value includes also dateTime values. So if
isDateTime()evaluates to true then this method will also evaluate to true
-
isDateTime
public boolean isDateTime()
- Returns:
- if this value is a valid dateTime value
-
isBoolean
public boolean isBoolean()
- Returns:
- if this value is of type boolean
-
getBooleanValue
public Optional<Boolean> getBooleanValue()
- Returns:
- gets this node as boolean if it is a boolean
-
getNumberValue
public Optional<BigDecimal> getNumberValue()
- Returns:
- gets this node as double if it is a double
-
getStringValue
public Optional<String> getStringValue()
- Returns:
- gets this node as string value if it is a string
-
getDateTime
public Optional<Instant> getDateTime()
- Returns:
- gets this node as dateTime if it is a dateTime
-
-