net.sf.myra.datamining.data
Class Term

java.lang.Object
  extended by net.sf.myra.datamining.data.Term
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, net.sf.myra.framework.Info

public class Term
extends java.lang.Object
implements net.sf.myra.framework.Info

This class represents a term in the antecedent of a rule.

Version:
$Revision: 2361 $ $Date:: 2011-04-14 16:24:19#$
Author:
Fernando Esteban Barril Otero
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from interface net.sf.myra.framework.Info
net.sf.myra.framework.Info.Void
 
Constructor Summary
Term(java.lang.String attribute, int index)
          Default constructor.
 
Method Summary
 Term clone()
           
 boolean equals(java.lang.Object o)
           
 boolean equals(Term o)
          Compares this term against the specified term for equality.
 java.lang.String getAttribute()
          Returns the term's attribute name.
 int getIndex()
          Returns the term's attribute index.
 Operator getOperator()
          Returns the term's operator.
 double[] getValues()
          Returns the term values.
 boolean satisfies(double value)
          Verifies if the specified attribute value satisfies the term.
 void setDescription(java.lang.String... description)
          Sets the term values description.
 void setOperator(Operator operator)
          Sets the term operator.
 void setValues(double... values)
          Sets the term values.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Term

public Term(java.lang.String attribute,
            int index)
Default constructor.

Parameters:
attribute - the attribute name.
index - the attribute index.
Method Detail

getAttribute

public java.lang.String getAttribute()
Returns the term's attribute name.

Returns:
the term's attribute name.

getOperator

public Operator getOperator()
Returns the term's operator.

Returns:
the term's operator.

getIndex

public int getIndex()
Returns the term's attribute index.

Returns:
the term's attribute index.

getValues

public double[] getValues()
Returns the term values.

Returns:
the term values.

setOperator

public void setOperator(Operator operator)
Sets the term operator.

Parameters:
operator - the operator to set.

setValues

public void setValues(double... values)
Sets the term values.

Parameters:
values - the values to set.

setDescription

public void setDescription(java.lang.String... description)
Sets the term values description.

Parameters:
description - the array of values description.

satisfies

public boolean satisfies(double value)
Verifies if the specified attribute value satisfies the term.

Parameters:
value - the attribute value.
Returns:
true if the attribute value satisfies the term operator; false otherwise.

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

equals

public boolean equals(Term o)
Compares this term against the specified term for equality.

Parameters:
o - the term to be compared to.
Returns:
true if both terms are equal; false otherwise.

clone

public Term clone()
Specified by:
clone in interface net.sf.myra.framework.Info
Overrides:
clone in class java.lang.Object

toString

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


Copyright © 2013. All Rights Reserved.