com.rapidminer.tools
Class WeightedObject<E>
java.lang.Object
com.rapidminer.tools.WeightedObject<E>
- All Implemented Interfaces:
- java.lang.Comparable<WeightedObject<E>>
public class WeightedObject<E>
- extends java.lang.Object
- implements java.lang.Comparable<WeightedObject<E>>
Class used to represent an object together with a double weight.
- Author:
- Michael Wurst
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
WeightedObject
public WeightedObject(E object,
double weight)
compareTo
public int compareTo(WeightedObject<E> objToCompare)
- Specified by:
compareTo in interface java.lang.Comparable<WeightedObject<E>>
getObject
public E getObject()
- Returns the object.
- Returns:
- Object
getWeight
public double getWeight()
- Returns the weight.
- Returns:
- double
toString
public java.lang.String toString()
- Overrides:
toString in class java.lang.Object
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals in class java.lang.Object
hashCode
public int hashCode()
- Overrides:
hashCode in class java.lang.Object
Copyright © 2001-2009 by Rapid-I