Class WeightedList<T>

java.lang.Object
org.geysermc.mcprotocollib.protocol.data.game.WeightedList<T>

public class WeightedList<T> extends Object
  • Constructor Details

    • WeightedList

      public WeightedList(io.netty.buffer.ByteBuf in, Function<io.netty.buffer.ByteBuf,T> reader)
    • WeightedList

      public WeightedList(List<WeightedList.Entry<T>> entries)
  • Method Details

    • write

      public void write(io.netty.buffer.ByteBuf out, BiConsumer<T,io.netty.buffer.ByteBuf> writer)
    • with

      public WeightedList<T> with(T value, @org.checkerframework.checker.index.qual.NonNegative int weight)
    • add

      public void add(T value, @org.checkerframework.checker.index.qual.NonNegative int weight)
    • add

      public void add(WeightedList.Entry<T> entry)
    • get

      public WeightedList.Entry<T> get(int index)
    • contains

      public boolean contains(T value)
    • getEntries

      public List<WeightedList.Entry<T>> getEntries()
    • equals

      public boolean equals(@Nullable Object o)
      Overrides:
      equals in class Object
    • canEqual

      protected boolean canEqual(@Nullable Object other)
    • hashCode

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

      public @NonNull String toString()
      Overrides:
      toString in class Object