Package gaiasky.util.filter
Class Filter
- java.lang.Object
-
- gaiasky.util.filter.Filter
-
public class Filter extends java.lang.Object
A filter on a dataset as a set of rules
-
-
Constructor Summary
Constructors Constructor Description Filter(FilterRule rule)
Creates a filter with only one ruleFilter(java.lang.String operation, com.badlogic.gdx.utils.Array<FilterRule> rules)
Filter(java.lang.String operation, FilterRule... rules)
Creates a new filter with the given rules and linking operation
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addRule(FilterRule rule)
Filter
deepCopy()
boolean
evaluate(ParticleGroup.ParticleBean pb)
gaiasky.util.filter.Filter.IOperation
getOperation()
gaiasky.util.filter.Filter.IOperation
getOperationFromString(java.lang.String op)
java.lang.String
getOperationString()
com.badlogic.gdx.utils.Array<FilterRule>
getRules()
boolean
hasRules()
boolean
removeRule(FilterRule rule)
void
setOperation(java.lang.String op)
-
-
-
Constructor Detail
-
Filter
public Filter(FilterRule rule)
Creates a filter with only one rule- Parameters:
rule
-
-
Filter
public Filter(java.lang.String operation, FilterRule... rules)
Creates a new filter with the given rules and linking operation- Parameters:
rules
- The rules listoperation
- The operation: 'and', 'or'
-
Filter
public Filter(java.lang.String operation, com.badlogic.gdx.utils.Array<FilterRule> rules)
-
-
Method Detail
-
deepCopy
public Filter deepCopy()
-
evaluate
public boolean evaluate(ParticleGroup.ParticleBean pb)
-
hasRules
public boolean hasRules()
-
getRules
public com.badlogic.gdx.utils.Array<FilterRule> getRules()
-
getOperation
public gaiasky.util.filter.Filter.IOperation getOperation()
-
getOperationString
public java.lang.String getOperationString()
-
setOperation
public void setOperation(java.lang.String op)
-
getOperationFromString
public gaiasky.util.filter.Filter.IOperation getOperationFromString(java.lang.String op)
-
addRule
public void addRule(FilterRule rule)
-
removeRule
public boolean removeRule(FilterRule rule)
-
-