javax.datamining.rule
Interface SimplePredicate

All Superinterfaces:
Predicate

public interface SimplePredicate
extends Predicate

A SimplePredicate consists of a single comparison between an attribute name and a constant. The constant can be of any JDM-accepted datatype.

Examples include age < 20 and gender == Male.

If the comparison function is in or notIn the value could be a set rather than a single constant. For example, marital_status IN { Single, Separated } is a simple predicate.

Author:
JSR-73 Java Data Mining Expert Group
See Also:
Predicate

Method Summary
 java.lang.String getAttributeName()
          Returns the name of the attribute associated with the predicate.
 java.lang.Object[] getCategoryValues()
          Returns an array of categorical values associated with the predicate if the type is categorical.
 ComparisonOperator getComparisonOperator()
          Returns the type of comparison associated with the predicate.
 java.lang.Double getNumericalValue()
          Returns the numerical constant value of the predicate.
 boolean isNumericalValue()
          Returns true if the constant associated with the predicate is a number.
 

Method Detail

getAttributeName

public java.lang.String getAttributeName()
Returns the name of the attribute associated with the predicate. The returned value must not be null.

Returns:
String

getCategoryValues

public java.lang.Object[] getCategoryValues()
Returns an array of categorical values associated with the predicate if the type is categorical. Returns null if the value type is numerical.

Returns:
Object[]

getComparisonOperator

public ComparisonOperator getComparisonOperator()
Returns the type of comparison associated with the predicate.

Returns:
ComparisonOperator

getNumericalValue

public java.lang.Double getNumericalValue()
Returns the numerical constant value of the predicate. Returns null if the value type is categorical.

Returns:
Double

isNumericalValue

public boolean isNumericalValue()
Returns true if the constant associated with the predicate is a number. Otherwise, it returns false.

Returns:
boolean