Class WeightedObject<T>
- java.lang.Object
-
- org.spongepowered.api.util.weighted.TableEntry<T>
-
- org.spongepowered.api.util.weighted.WeightedObject<T>
-
- Type Parameters:
T- The entry type
- Direct Known Subclasses:
WeightedSerializableObject
public class WeightedObject<T> extends TableEntry<T>
An entry which contains an object.
-
-
Constructor Summary
Constructors Constructor Description WeightedObject(T obj, double weight)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object o)Tget()Gets the entry contained in this entry.inthashCode()java.lang.StringtoString()-
Methods inherited from class org.spongepowered.api.util.weighted.TableEntry
weight
-
-
-
-
Constructor Detail
-
WeightedObject
public WeightedObject(T obj, double weight)
- Parameters:
obj- The objectweight- The weight of the object
-
-
Method Detail
-
get
public T get()
Gets the entry contained in this entry.- Returns:
- The object
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-