public class NumberSupplier extends java.lang.Object implements ResettableSupplier<java.lang.Long>
| Constructor and Description |
|---|
NumberSupplier(long startNumber,
long endNumber)
Creates the number supplier.
|
NumberSupplier(long startNumber,
long endNumber,
long incrementBy)
Creates the number supplier.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object o) |
java.lang.Long |
get() |
int |
hashCode() |
void |
reset()
Resets the state of this supplier so that the next call to
get() returns as if it were the first time the method were called |
java.lang.String |
toString() |
public NumberSupplier(long startNumber,
long endNumber)
startNumber - The starting number to return (inclusive)endNumber - The ending number to return (inclusive)public NumberSupplier(long startNumber,
long endNumber,
long incrementBy)
startNumber - The starting number to return (inclusive)endNumber - The ending number to return (inclusive)incrementBy - How much to increment each timepublic void reset()
ResettableSupplierget() returns as if it were the first time the method were calledreset in interface ResettableSupplier<java.lang.Long>@Nullable public java.lang.Long get()
get in interface java.util.function.Supplier<java.lang.Long>public boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Object