Package org.multiverse.api.functions
Class IncIntFunction
- java.lang.Object
-
- org.multiverse.api.functions.IntFunction
-
- org.multiverse.api.functions.IncIntFunction
-
- All Implemented Interfaces:
Function<java.lang.Integer>
public final class IncIntFunction extends IntFunction
AIntFunctionthat increased the value with the supplied amount.
-
-
Field Summary
Fields Modifier and Type Field Description private intincstatic IncIntFunctionINSTANCE
-
Constructor Summary
Constructors Constructor Description IncIntFunction()Creates an IncIntFunction that adds one.IncIntFunction(int inc)Creates an IncIntFunction with the specified
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcall(int current)Calculates the new value based on the current value.java.lang.StringtoString()-
Methods inherited from class org.multiverse.api.functions.IntFunction
call
-
-
-
-
Field Detail
-
INSTANCE
public static final IncIntFunction INSTANCE
-
inc
private final int inc
-
-
Method Detail
-
call
public int call(int current)
Description copied from class:IntFunctionCalculates the new value based on the current value.- Specified by:
callin classIntFunction- Parameters:
current- the current value.- Returns:
- the new value.
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-