Package org.spongepowered.api.util.weighted
@DefaultQualifier(org.checkerframework.checker.nullness.qual.NonNull.class)
package org.spongepowered.api.util.weighted

InterfaceDescriptionRepresents a value which may vary depending on a seed object.Represents a value which may vary randomly.

ClassDescriptionChanceTable<T>This is a variant of the
RandomObjectTable
which uses a 01 chance attached to every entry.EmptyObject<T>Represents an entry in a table which has no associated object.LootTable<T>Represents a pool of tables which are rolled sequentially when retrieving entries.Represents aRandomObjectTable
which is nested inside the entry of another table.An abstract table holding weighted objects.ASeededVariableAmount
which wraps anotherVariableAmount
and defers all operations to the inner VariableAmount without the seed.TableEntry<T>An abstract entry which may be contained in any table.Creates a WeightedTable that is completely immutable, but still is able to be changed via its proxy table.Represents a base amount with a random addition, the final amount will be the base amount plus a random amount between zero (inclusive) and the addition (exclusive).Represents a base amount with a variance, the final amount will be the base amount plus or minus a random amount between zero (inclusive) and the variance (exclusive).Represents a fixed amount, calls toVariableAmount.Fixed.amount
will always return the same fixed value.Represents a variable amount which has a base and a chance of varying.An entry which contains an object.WeightedSerializableObject<T extends DataSerializable>An entry which contains an object with the added restriction that the object be serializable.A table of weighted entry, each entry is given a weight, the higher the weight the more likely the chance that the entry is chosen.