@DefaultQualifier(org.checkerframework.checker.nullness.qual.NonNull.class)
Package org.spongepowered.api.util.weighted
-
Interface Summary Interface Description SeededVariableAmount<T> Represents a value which may vary depending on a seed object.VariableAmount Represents a value which may vary randomly. -
Class Summary Class Description ChanceTable<T> This is a variant of theRandomObjectTable
which uses a 0-1 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.NestedTableEntry<T> Represents aRandomObjectTable
which is nested inside the entry of another table.RandomObjectTable<T> An abstract table holding weighted objects.SeededVariableAmount.WrappedVariableAmount<T> 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.UnmodifiableWeightedTable<T> Creates a WeightedTable that is completely immutable, but still is able to be changed via its proxy table.VariableAmount.BaseAndAddition 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).VariableAmount.BaseAndVariance 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).VariableAmount.Fixed Represents a fixed amount, calls toVariableAmount.Fixed.amount
will always return the same fixed value.VariableAmount.OptionalAmount Represents a variable amount which has a base and a chance of varying.WeightedObject<T> 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.WeightedTable<T> 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.