java.lang.Object
com.pervasive.datarush.types.FieldDomain
- All Implemented Interfaces:
Serializable
Contains meta-information about the allowed values, lower, and upper bounds
for a given field.
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionFieldDomain(ScalarValued lowerBound, ScalarValued upperBound, Set<? extends ScalarValued> values) Creates a new field domain -
Method Summary
Modifier and TypeMethodDescriptionvoidcheckType(String field, ScalarTokenType type) Checks that the type of the domain matches the type of the fieldbooleanReturns the lower bound of the field ornullif unknownReturns the upper bound of the field ornullif unknownReturns the allowed values of the field oremptyif unknown.booleanReturns true if values are specifiedinthashCode()booleanReturns true if lower bound, upper bound, or values are specifiedtoString()
-
Field Details
-
UNSPECIFIED
The unspecified field domain
-
-
Constructor Details
-
FieldDomain
public FieldDomain(ScalarValued lowerBound, ScalarValued upperBound, Set<? extends ScalarValued> values) Creates a new field domain- Parameters:
lowerBound- the lower bound ornullif unknownupperBound- the upper bound ofnullif unknownvalues- the possible values. Note that eithernullor the empty set is interpreted is unknown. The value ofgetValues()will always be normalized to the empty set in the case of unknown.
-
-
Method Details
-
getLowerBound
Returns the lower bound of the field ornullif unknown- Returns:
- the lower bound of the field
-
getUpperBound
Returns the upper bound of the field ornullif unknown- Returns:
- the upper bound of the field
-
getValues
Returns the allowed values of the field oremptyif unknown.- Returns:
- the allowed values of the field
-
checkType
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
-
hashCode
public int hashCode() -
equals
-
toString
-