## org.apache.mahout.classifier.df.data.conditions
Class Condition

    java.lang.Object
      org.apache.mahout.classifier.df.data.conditions.Condition

Direct Known Subclasses:
  Equals, GreaterOrEquals, Lesser

    public abstract class Condition

extends Object

Condition on Instance

Constructor Summary
`Condition()`

Method Summary
`static Condition` `equals(int attr, double value)` Condition that checks if the given attribute has a value "equal" to the given value
`static Condition` `greaterOrEquals(int attr, double value)` Condition that checks if the given attribute has a value "greater or equal" than the given value
`abstract boolean` `isTrueFor(Instance instance)` Returns true is the checked instance matches the condition
`static Condition` `lesser(int attr, double value)` Condition that checks if the given attribute has a value "lesser" than the given value

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### Condition

    public Condition()

Method Detail

### isTrueFor

    public abstract boolean isTrueFor(Instance instance)

  Returns true is the checked instance matches the condition

  Parameters:
    `instance` - checked instance
  Returns:
    true is the checked instance matches the condition

### equals

    public static Condition equals(int attr,
                                   double value)

  Condition that checks if the given attribute has a value "equal" to the given value

### lesser

    public static Condition lesser(int attr,
                                   double value)

  Condition that checks if the given attribute has a value "lesser" than the given value

### greaterOrEquals

    public static Condition greaterOrEquals(int attr,
                                            double value)

  Condition that checks if the given attribute has a value "greater or equal" than the given value

Copyright © 2008–2014 The Apache Software Foundation. All rights reserved.