Package gaiasky.util.filter
Class FilterRule
- java.lang.Object
-
- gaiasky.util.filter.FilterRule
-
public class FilterRule extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
FilterRule.ComparatorEq
class
FilterRule.ComparatorG
class
FilterRule.ComparatorGeq
class
FilterRule.ComparatorL
class
FilterRule.ComparatorLeq
class
FilterRule.ComparatorNeq
static interface
FilterRule.IComparator
-
Constructor Summary
Constructors Constructor Description FilterRule(java.lang.String comp, IAttribute attr, double val)
Creates a new filter with the given attribute, value and comparator function
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description FilterRule
copy()
boolean
evaluate(ParticleGroup.ParticleBean bean)
IAttribute
getAttribute()
FilterRule.IComparator
getComparator()
FilterRule.IComparator
getComparatorFromString(java.lang.String c)
double
getValue()
void
setAttribute(IAttribute attr)
void
setComparator(FilterRule.IComparator comp)
void
setValue(double value)
-
-
-
Constructor Detail
-
FilterRule
public FilterRule(java.lang.String comp, IAttribute attr, double val)
Creates a new filter with the given attribute, value and comparator function- Parameters:
comp
- The comparator function: '>', '>=', '<', '<=', '==', '!='attr
- The attribute to compareval
- The value to compare to
-
-
Method Detail
-
evaluate
public boolean evaluate(ParticleGroup.ParticleBean bean)
-
copy
public FilterRule copy()
-
getValue
public double getValue()
-
setValue
public void setValue(double value)
-
getComparator
public FilterRule.IComparator getComparator()
-
setComparator
public void setComparator(FilterRule.IComparator comp)
-
getAttribute
public IAttribute getAttribute()
-
setAttribute
public void setAttribute(IAttribute attr)
-
getComparatorFromString
public FilterRule.IComparator getComparatorFromString(java.lang.String c)
-
-