Package weka.associations
Class NominalItem
- java.lang.Object
-
- weka.associations.Item
-
- weka.associations.NominalItem
-
- All Implemented Interfaces:
Serializable,Comparable<Item>
- Direct Known Subclasses:
BinaryItem
public class NominalItem extends Item implements Serializable
Class that encapsulates a nominal item.- Version:
- $Revision$
- Author:
- Mark Hall (mhall{[at]}pentaho{[dot]}com)
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description NominalItem(Attribute att, int valueIndex)Constructs a new NominalItem.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object compareTo)Equals.StringgetComparisonAsString()Get this item's comparison operator as a String.StringgetItemValueAsString()Get this item's value as a String.intgetValueIndex()Get the value index for this item.StringtoString(boolean freq)A string representation of this item, (i.e.-
Methods inherited from class weka.associations.Item
compareTo, decreaseFrequency, decreaseFrequency, getAttribute, getFrequency, hashCode, increaseFrequency, increaseFrequency, toString
-
-
-
-
Method Detail
-
getValueIndex
public int getValueIndex()
Get the value index for this item.- Returns:
- the value index.
-
getItemValueAsString
public String getItemValueAsString()
Get this item's value as a String.- Specified by:
getItemValueAsStringin classItem- Returns:
- this item's value as a String.
-
getComparisonAsString
public String getComparisonAsString()
Get this item's comparison operator as a String.- Specified by:
getComparisonAsStringin classItem- Returns:
- this item's comparison operator as a String.
-
toString
public String toString(boolean freq)
A string representation of this item, (i.e.- ). This default implementation just prints the attribute name and (optionally) frequency information.
-
-