|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectweka.associations.Item
public abstract class Item
Class that encapsulates information about an individual item. An item is a value of a nominal attribute, so this class has a backing Attribute.
Constructor Summary | |
---|---|
Item(Attribute att)
|
Method Summary | |
---|---|
int |
compareTo(Item comp)
Ensures that items will be sorted in descending order of frequency. |
void |
decreaseFrequency()
Decrement the frequency of this item. |
void |
decreaseFrequency(int f)
Decrease the frequency of this item. |
boolean |
equals(java.lang.Object compareTo)
Equals. |
Attribute |
getAttribute()
Get the attribute that this item originates from. |
abstract java.lang.String |
getComparisonAsString()
Get this item's comparison operator as a String. |
int |
getFrequency()
Get the frequency of this item. |
abstract java.lang.String |
getItemValueAsString()
Get this item's value as a String. |
int |
hashCode()
|
void |
increaseFrequency()
Increment the frequency of this item. |
void |
increaseFrequency(int f)
Increase the frequency of this item. |
java.lang.String |
toString()
A string representation of this item. |
java.lang.String |
toString(boolean freq)
A string representation of this item, (i.e. |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Item(Attribute att)
Method Detail |
---|
public void increaseFrequency(int f)
f
- the amount to increase the frequency by.public void decreaseFrequency(int f)
f
- the amount by which to decrease the frequency.public void increaseFrequency()
public void decreaseFrequency()
public int getFrequency()
public Attribute getAttribute()
public abstract java.lang.String getItemValueAsString()
public abstract java.lang.String getComparisonAsString()
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String toString(boolean freq)
freq
- true if the frequency should be included.
public int compareTo(Item comp)
compareTo
in interface java.lang.Comparable<Item>
comp
- the Item to compare against.public boolean equals(java.lang.Object compareTo)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |