toxi.util.datatypes
Class WeightedRandomEntry<T>
java.lang.Object
toxi.util.datatypes.WeightedRandomEntry<T>
- Type Parameters:
T
-
- All Implemented Interfaces:
- java.lang.Comparable<WeightedRandomEntry<T>>
public class WeightedRandomEntry<T>
- extends java.lang.Object
- implements java.lang.Comparable<WeightedRandomEntry<T>>
This class encapsulates a single element within a WeightedRandomSet
.
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
WeightedRandomEntry
public WeightedRandomEntry(T item,
int weight)
compareTo
public int compareTo(WeightedRandomEntry<T> e)
- Specified by:
compareTo
in interface java.lang.Comparable<WeightedRandomEntry<T>>
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object