Class NestedTableEntry<T>

java.lang.Object
org.spongepowered.api.util.weighted.TableEntry<T>
org.spongepowered.api.util.weighted.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.
  • Constructor Details

    • 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 Details

    • get

      public List<T> get(RandomGenerator rand)
      Retrieves entries from the nested table.
      Parameters:
      rand - The random object to use
      Returns:
      The retrieved entries
    • getNestedTable

      public RandomObjectTable<T> getNestedTable()
      Returns the nested table
      Returns:
      The nested table
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

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

      public String toString()
      Overrides:
      toString in class Object