com.rapidminer.tools
Class WeightedObject<E>

java.lang.Object
  extended by 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

Constructor Summary
WeightedObject(E object, double weight)
           
 
Method Summary
 int compareTo(WeightedObject<E> objToCompare)
           
 boolean equals(java.lang.Object obj)
           
 E getObject()
          Returns the object.
 double getWeight()
          Returns the weight.
 int hashCode()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

WeightedObject

public WeightedObject(E object,
                      double weight)
Method Detail

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