com.rapidminer.example.set
Class AttributeValueFilter

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

public class AttributeValueFilter
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. This filter can be constructed from several conditions of the class AttributeValueFilterSingleCondition which must all be fulfilled.

Author:
Ingo Mierswa
See Also:
Serialized Form

Constructor Summary
AttributeValueFilter(Attribute attribute, int comparisonType, java.lang.String value)
          Creates a new AttributeValueFilter.
AttributeValueFilter(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 all conditions are 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
 

Constructor Detail

AttributeValueFilter

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


AttributeValueFilter

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

Parameters:
parameterString - Must be of the form attribute1 R1 value1 RR attribute2 R2 value2 RR ..., where Ri is one out of =, != or <>, <, >, <=, and >= and all RR must be either || for OR or && for 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 all conditions are fulfilled for the given example.

Specified by:
conditionOk in interface Condition


Copyright © 2001-2009 by Rapid-I