- Type Parameters:
ENTITY- the entity
- All Superinterfaces:
Getter<ENTITY>,ToIntFunction<ENTITY>
- All Known Subinterfaces:
GetInt<ENTITY>
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface
public interface IntGetter<ENTITY>
extends Getter<ENTITY>, ToIntFunction<ENTITY>
A short-cut functional reference to the
getXXX(value) method for a
particular field in an entity.
A IntegerGetter<ENTITY> has the following signature:
interface ENTITY {
int getXXX();
}
- Since:
- 3.0.0
- Author:
- Emil Forslund
-
Method Summary
Modifier and TypeMethodDescriptiondefault IntegerA generic (untyped) get method.intapplyAsInt(ENTITY instance) Returns the member represented by this getter in the specified instance.Returns this object, typed as aFunctionmethod.
-
Method Details
-
applyAsInt
Returns the member represented by this getter in the specified instance.- Specified by:
applyAsIntin interfaceToIntFunction<ENTITY>- Parameters:
instance- the instance to get from- Returns:
- the value
-
apply
Description copied from interface:GetterA generic (untyped) get method. -
asFunction
Description copied from interface:GetterReturns this object, typed as aFunctionmethod.- Specified by:
asFunctionin interfaceGetter<ENTITY>- Returns:
- this object as a function
-