Class NestedTableEntry<T>

  • Type Parameters:
    T - The entry type

    public class NestedTableEntry<T>
    extends TableEntry<T>
    Represents a RandomObjectTable which is nested inside the entry of another table.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object o)  
      java.util.List<T> get​(java.util.Random rand)
      Retrieves entries from the nested table.
      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

      • NestedTableEntry

        public NestedTableEntry​(double weight,
                                RandomObjectTable<T> table)
        Creates a new NestedTableEntry with the provided weight and table.
        Parameters:
        weight - The weight to apply to the entry
        table - The table itself
    • Method Detail

      • get

        public java.util.List<T> get​(java.util.Random rand)
        Retrieves entries from the nested table.
        Parameters:
        rand - The random object to use
        Returns:
        The retrieved entries
      • 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