Interface SeededVariableAmount<T>
- Type Parameters:
- T- The seed object type
- All Known Implementing Classes:
- SeededVariableAmount.WrappedVariableAmount
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Represents a value which may vary depending on a seed object.
- 
Nested Class SummaryNested ClassesModifier and TypeInterfaceDescriptionstatic final classASeededVariableAmountwhich wraps anotherVariableAmountand defers all operations to the inner VariableAmount without the seed.
- 
Method SummaryModifier and TypeMethodDescriptiondoubleGets an instance of the variable amount depending on the given random object and the seed object.static <T> SeededVariableAmount<T>fixed(double value) Creates a new 'fixed' variable amount, calls toamount(java.util.Random, T)will always return the fixed value.default intflooredAmount(Random rand, T seed) Gets the amount as if fromamount(Random, Object)but floored to the nearest integer equivalent.static <T> SeededVariableAmount<T>wrapped(VariableAmount value) Creates a new variable amount wrapping the givenVariableAmount, calls toamount(java.util.Random, T)will always return wrapped amounts value.
- 
Method Details- 
fixedCreates a new 'fixed' variable amount, calls toamount(java.util.Random, T)will always return the fixed value.- Type Parameters:
- T- The seed object type
- Parameters:
- value- The fixed value
- Returns:
- A variable amount representation
 
- 
wrappedCreates a new variable amount wrapping the givenVariableAmount, calls toamount(java.util.Random, T)will always return wrapped amounts value.- Type Parameters:
- T- The seed object type
- Parameters:
- value- The wrapped variable amount
- Returns:
- A variable amount representation
 
- 
amountGets an instance of the variable amount depending on the given random object and the seed object.- Parameters:
- rand- The random object
- seed- The seed object
- Returns:
- The amount
 
- 
flooredAmountGets the amount as if fromamount(Random, Object)but floored to the nearest integer equivalent.- Parameters:
- rand- The random object
- seed- The seed object
- Returns:
- The floored amount
 
 
-