Class WeightedObject<T>

    • Constructor Summary

      Constructors 
      Constructor Description
      WeightedObject​(T obj, double weight)
      Creates a new WeightedObject of the provided object and weight.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object o)  
      T get()
      Gets the entry contained in this entry.
      int hashCode()  
      java.lang.String toString()  
      • Methods inherited from class org.spongepowered.api.util.weighted.TableEntry

        weight
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • WeightedObject

        public WeightedObject​(T obj,
                              double weight)
        Creates a new WeightedObject of the provided object and weight.
        Parameters:
        obj - The object
        weight - 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:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object