com.rapidminer.example.set
Class AttributeValueFilterSingleCondition

java.lang.Object
  extended by com.rapidminer.example.set.AttributeValueFilterSingleCondition
All Implemented Interfaces:
Condition, java.io.Serializable

public class AttributeValueFilterSingleCondition
extends java.lang.Object
implements Condition

The condition is fulfilled if an attribute has a value equal to, not equal to, less than, ... a given value.

Author:
Ingo Mierswa
See Also:
Serialized Form

Field Summary
static int EQUALS
           
static int GEQ
           
static int GREATER
           
static int LEQ
           
static int LESS
           
static int NEQ1
           
static int NEQ2
           
 
Constructor Summary
AttributeValueFilterSingleCondition(Attribute attribute, int comparisonType, java.lang.String value)
          Creates a new AttributeValueFilter.
AttributeValueFilterSingleCondition(ExampleSet exampleSet, java.lang.String parameterString)
          Constructs an AttributeValueFilter for a given ExampleSet from a parameter string
 
Method Summary
 boolean conditionOk(Example e)
          Returns true if the condition is fulfilled for the given example.
 Condition duplicate()
          Deprecated. Conditions should not be able to be changed dynamically and hence there is no need for a copy
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

LEQ

public static final int LEQ
See Also:
Constant Field Values

GEQ

public static final int GEQ
See Also:
Constant Field Values

NEQ1

public static final int NEQ1
See Also:
Constant Field Values

NEQ2

public static final int NEQ2
See Also:
Constant Field Values

EQUALS

public static final int EQUALS
See Also:
Constant Field Values

LESS

public static final int LESS
See Also:
Constant Field Values

GREATER

public static final int GREATER
See Also:
Constant Field Values
Constructor Detail

AttributeValueFilterSingleCondition

public AttributeValueFilterSingleCondition(Attribute attribute,
                                           int comparisonType,
                                           java.lang.String value)
Creates a new AttributeValueFilter. If attribute is not nominal, value must be a number.


AttributeValueFilterSingleCondition

public AttributeValueFilterSingleCondition(ExampleSet exampleSet,
                                           java.lang.String parameterString)
Constructs an AttributeValueFilter for a given ExampleSet from a parameter string

Parameters:
parameterString - Must be of the form attribute R value, where R is one out of =, !=, <&, >, <=, and >=.
Method Detail

duplicate

@Deprecated
public Condition duplicate()
Deprecated. Conditions should not be able to be changed dynamically and hence there is no need for a copy

Since the condition cannot be altered after creation we can just return the condition object itself.

Specified by:
duplicate in interface Condition

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

conditionOk

public boolean conditionOk(Example e)
Returns true if the condition is fulfilled for the given example.

Specified by:
conditionOk in interface Condition


Copyright © 2001-2009 by Rapid-I