public class MultiValuedCriterion extends NegatableCriterion
Examples of multi-valued criteria include
{a,b}<attribute<{a,b,c}
, !attribute>{d,e}
and attribute={a;b}
.
Criterion.Operator
NEGATION
Constructor and Description |
---|
MultiValuedCriterion(String attribute,
ValueSet lowSet,
ValueSet highSet,
boolean negation)
Instantiates a
MultiValuedCriterion on the given attribute. |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
ValueSet |
getGreaterThan()
Returns a reference to the internal lowSet.
|
ValueSet |
getLessThan()
Returns a reference to the internal highSet.
|
int |
hashCode() |
boolean |
isEqual()
Tells whether this criterion is an equality test.
|
MultiValuedCriterion |
setEqualTo(ValueSet valueSet)
Sets this criterion to test for equality with the given
ValueSet . |
MultiValuedCriterion |
setGreaterThan(ValueSet lowSetParam)
Sets the lower bound of this criterion.
|
MultiValuedCriterion |
setLessThan(ValueSet highSetParam)
Sets the upper bound of this criterion.
|
void |
toLocation(StringBuilder buffer)
Appends the string representation of this criterion to the given
StringBuilder . |
isNegate, isValidAttributeName, setNegate
getAttributeName, toLocation, toString
public MultiValuedCriterion(String attribute, ValueSet lowSet, ValueSet highSet, boolean negation)
MultiValuedCriterion
on the given attribute.
This criterion will select items which value for the specified attribute is bounded by the given lower and upper bound. These bounds are called the lowSet and highSet, respectively. If lowSet equals highSet then this criterion represents an equality test.
attribute
- The non-ML name of the attribute on which this criterion
operates.lowSet
- The lower bound ValueSet
for this criterion;
null
if no lower bound.highSet
- The upper bound ValueSet
for this criterion;
null
if no upper bound.negation
- If true
this criterion will be configured to be a
negation.IllegalArgumentException
- If attribute is not a valid attribute name or both
lowSet and highSet are null
.public void toLocation(StringBuilder buffer)
StringBuilder
.
The general contract of this method is that if the StringBuilder
contains a valid location ending in a forward slash string prior
to invocation of this method, then its contents must also form a valid
location string upon completion of this method.
Important: this method will not itself insert a leading slash!
toLocation
in class Criterion
buffer
- The StringBuilder
to which the string representation of
this criterion is to be appended.public MultiValuedCriterion setGreaterThan(ValueSet lowSetParam)
lowSetParam
- The lower bound ValueSet
for this criterion.MultiValuedCriterion
instance; useful for chained
manipulations.IllegalArgumentException
- If lowSet is null
while the internal
highSet is null
as well.public ValueSet getGreaterThan()
null
if no
lower bound is set.public MultiValuedCriterion setLessThan(ValueSet highSetParam)
highSetParam
- The upper bound ValueSet
for this criterion.MultiValuedCriterion
instance; useful for chained
manipulations.IllegalArgumentException
- If highSet is null
while the internal
lowSet is null
as well.public ValueSet getLessThan()
null
if no
upper bound is set.public MultiValuedCriterion setEqualTo(ValueSet valueSet)
ValueSet
.valueSet
- The ValueSet
to test against.MultiValuedCriterion
instance; useful for chained
manipulations.IllegalArgumentException
- If valueSet is null
.public boolean isEqual()
true
if the internal lowSet and
highSet are equal; false
otherwise.public boolean equals(Object o)
equals
in class NegatableCriterion
public int hashCode()
hashCode
in class NegatableCriterion
Copyright © 2021 RWS Group for and on behalf of its affiliates and subsidiaries. All rights reserved.