public class SearchPredicate extends InGroupPredicate
SearchTupleSet
, but including a possible special case in
which all items should be pass through the predicate if no search query is specified.
The data group name is provided by a String-valued sub-expression.m_group
Constructor and Description |
---|
SearchPredicate()
Create a new SearchPredicate.
|
SearchPredicate(boolean includeAllByDefault)
Create a new SearchPredicate.
|
SearchPredicate(java.lang.String group,
boolean includeAllByDefault)
Create a new SearchPredicate.
|
Modifier and Type | Method and Description |
---|---|
void |
addParameter(Expression e)
Attempts to add the given expression as the group expression.
|
boolean |
getBoolean(Tuple t)
By default, throws an UnsupportedOperationException.
|
java.lang.String |
getName()
Get the name of this function.
|
int |
getParameterCount()
Get the maximum number of parameters accepted by this Function.
|
java.lang.String |
toString() |
get, getType
getGroup
addChildListeners, addExpressionListener, expressionChanged, fireExpressionChange, getDouble, getFloat, getInt, getLong, hasListeners, removeChildListeners, removeExpressionListener, visit
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
addExpressionListener, getDouble, getFloat, getInt, getLong, removeExpressionListener, visit
public SearchPredicate()
Visualization.ALL_ITEMS
data group and assumes all items
should pass the predicate if no search query has been specified.public SearchPredicate(boolean includeAllByDefault)
Visualization.ALL_ITEMS
data group.includeAllByDefault
- indicates if all items
should pass the predicate if no search query has been specified.public SearchPredicate(java.lang.String group, boolean includeAllByDefault)
group
- the data group to look up, should resolve to a
SearchTupleSet
instance.includeAllByDefault
- indicates if all items
should pass the predicate if no search query has been specified.public boolean getBoolean(Tuple t)
AbstractExpression
getBoolean
in interface Expression
getBoolean
in class InGroupPredicate
t
- the input TupleExpression.getBoolean(prefuse.data.Tuple)
public void addParameter(Expression e)
GroupExpression
addParameter
in interface Function
addParameter
in class GroupExpression
e
- the parameter sub-expressionFunction.addParameter(prefuse.data.expression.Expression)
public java.lang.String getName()
Function
getName
in interface Function
getName
in class InGroupPredicate
Function.getName()
public int getParameterCount()
Function
getParameterCount
in interface Function
getParameterCount
in class GroupExpression
Function.VARARGS
is the number is variable.Function.getParameterCount()
public java.lang.String toString()
toString
in class GroupExpression
Object.toString()
Copyright ? 2013 Regents of the University of California