public class StringRefinement extends Refinement<java.lang.String>
Refinement.Clause<T>
Constructor and Description |
---|
StringRefinement(java.util.List<Refinement.Clause<java.lang.String>> clauses,
int count)
Constructs a StringRefinement with a List of clauses and a count.
|
StringRefinement(java.lang.String value,
int count)
Constructs a StringRefinement with a List of clauses and a count.
|
StringRefinement(java.lang.String value,
java.lang.String comparator,
int count)
Constructs a StringRefinement with a List of clauses and a count.
|
Modifier and Type | Method and Description |
---|---|
protected void |
buildName(java.lang.String value)
Builds the name of the StringRefinement with a String value.
|
ComplexPredicate.ConjunctionOp |
getConjunctionOp()
When we have a ComplexPredicate built using StringRefinements,
the default is an OR, which supports operations like
"user in {user1,user2}"
|
boolean |
hasMatch(java.lang.String value)
Returns whether the String value passed in matches
the criteria held in this Refinement.
|
addAttributePredicate, buildName, buildName, createPredicate, getClauses, getCount, getName, getValue, increment, increment, initClauses, isCurrent, refine, setCount, setCurrent, setName, toString
public StringRefinement(java.util.List<Refinement.Clause<java.lang.String>> clauses, int count)
clauses
- the List off Refinement.Clause objects to be used
in this Refinement.count
- the number of results expected when this
StringRefinement is appliedpublic StringRefinement(java.lang.String value, java.lang.String comparator, int count)
value
- the String value we want to the clause to test equality withcomparator
- a comparator to override the default EQUALS, e.g. CONTAINScount
- the number of results expected when this
StringRefinement is appliedpublic StringRefinement(java.lang.String value, int count)
value
- the String value we want to the clause to test equality withcount
- the number of results expected when this
StringRefinement is appliedpublic ComplexPredicate.ConjunctionOp getConjunctionOp()
getConjunctionOp
in class Refinement<java.lang.String>
protected void buildName(java.lang.String value)
buildName
in class Refinement<java.lang.String>
value
- the String value to use to build the namepublic boolean hasMatch(java.lang.String value)
hasMatch
in class Refinement<java.lang.String>
value
- the String value to be matched.