- java.lang.Object
-
- com.pervasive.datarush.types.FieldDomain
-
- All Implemented Interfaces:
Serializable
public final class FieldDomain extends Object implements Serializable
Contains meta-information about the allowed values, lower, and upper bounds for a given field.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static FieldDomain
UNSPECIFIED
The unspecified field domain
-
Constructor Summary
Constructors Constructor Description FieldDomain(ScalarValued lowerBound, ScalarValued upperBound, Set<? extends ScalarValued> values)
Creates a new field domain
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
checkType(String field, ScalarTokenType type)
Checks that the type of the domain matches the type of the fieldboolean
equals(Object obj)
ScalarValued
getLowerBound()
Returns the lower bound of the field ornull
if unknownScalarValued
getUpperBound()
Returns the upper bound of the field ornull
if unknownSet<ScalarValued>
getValues()
Returns the allowed values of the field orempty
if unknown.boolean
hasDomainValues()
Returns true if values are specifiedint
hashCode()
boolean
isSpecified()
Returns true if lower bound, upper bound, or values are specifiedString
toString()
-
-
-
Field Detail
-
UNSPECIFIED
public static final FieldDomain UNSPECIFIED
The unspecified field domain
-
-
Constructor Detail
-
FieldDomain
public FieldDomain(ScalarValued lowerBound, ScalarValued upperBound, Set<? extends ScalarValued> values)
Creates a new field domain- Parameters:
lowerBound
- the lower bound ornull
if unknownupperBound
- the upper bound ofnull
if unknownvalues
- the possible values. Note that eithernull
or the empty set is interpreted is unknown. The value ofgetValues()
will always be normalized to the empty set in the case of unknown.
-
-
Method Detail
-
getLowerBound
public ScalarValued getLowerBound()
Returns the lower bound of the field ornull
if unknown- Returns:
- the lower bound of the field
-
getUpperBound
public ScalarValued getUpperBound()
Returns the upper bound of the field ornull
if unknown- Returns:
- the upper bound of the field
-
getValues
public Set<ScalarValued> getValues()
Returns the allowed values of the field orempty
if unknown.- Returns:
- the allowed values of the field
-
checkType
public void checkType(String field, ScalarTokenType type)
Checks that the type of the domain matches the type of the field- Parameters:
field
- the name of the field, used for error handlingtype
- the type of the field- Throws:
IllegalArgumentException
- if domain is invalid
-
isSpecified
public boolean isSpecified()
Returns true if lower bound, upper bound, or values are specified- Returns:
- true if lower bound, upper bound, or values are specified
-
hasDomainValues
public boolean hasDomainValues()
Returns true if values are specified- Returns:
- true if values are specified
-
-