Class SeededVariableAmount.WrappedVariableAmount<T>
- java.lang.Object
-
- org.spongepowered.api.util.weighted.SeededVariableAmount.WrappedVariableAmount<T>
-
- Type Parameters:
T- The seed type
- All Implemented Interfaces:
SeededVariableAmount<T>
- Enclosing interface:
- SeededVariableAmount<T>
public static final class SeededVariableAmount.WrappedVariableAmount<T> extends Object implements SeededVariableAmount<T>
ASeededVariableAmountwhich wraps anotherVariableAmountand defers all operations to the inner VariableAmount without the seed.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.spongepowered.api.util.weighted.SeededVariableAmount
SeededVariableAmount.WrappedVariableAmount<T>
-
-
Constructor Summary
Constructors Constructor Description WrappedVariableAmount(VariableAmount inner)Creates a new WrappedVariableAmount wrapping the givenVariableAmount.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description doubleamount(Random rand, T seed)Gets an instance of the variable amount depending on the given random object and the seed object.booleanequals(Object obj)inthashCode()StringtoString()-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.spongepowered.api.util.weighted.SeededVariableAmount
flooredAmount
-
-
-
-
Constructor Detail
-
WrappedVariableAmount
public WrappedVariableAmount(VariableAmount inner)
Creates a new WrappedVariableAmount wrapping the givenVariableAmount.- Parameters:
inner- The inner variable amount
-
-
Method Detail
-
amount
public double amount(Random rand, T seed)
Description copied from interface:SeededVariableAmountGets an instance of the variable amount depending on the given random object and the seed object.- Specified by:
amountin interfaceSeededVariableAmount<T>- Parameters:
rand- The random objectseed- The seed object- Returns:
- The amount
-
-