Interface LongGetter<ENTITY>

Type Parameters:
ENTITY - the entity
All Superinterfaces:
Getter<ENTITY>, ToLongFunction<ENTITY>
All Known Subinterfaces:
GetLong<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 LongGetter<ENTITY> extends Getter<ENTITY>, ToLongFunction<ENTITY>
A short-cut functional reference to the getXXX(value) method for a particular field in an entity.

A LongGetter<ENTITY> has the following signature: interface ENTITY { long getXXX(); }

Since:
3.0.0
Author:
Emil Forslund
  • Method Summary

    Modifier and Type
    Method
    Description
    default Long
    apply(ENTITY instance)
    A generic (untyped) get method.
    long
    applyAsLong(ENTITY instance)
    Returns the member represented by this getter in the specified instance.
    Returns this object, typed as a Function method.
  • Method Details

    • applyAsLong

      long applyAsLong(ENTITY instance)
      Returns the member represented by this getter in the specified instance.
      Specified by:
      applyAsLong in interface ToLongFunction<ENTITY>
      Parameters:
      instance - the instance to get from
      Returns:
      the value
    • apply

      default Long apply(ENTITY instance)
      Description copied from interface: Getter
      A generic (untyped) get method.
      Specified by:
      apply in interface Getter<ENTITY>
      Parameters:
      instance - the entity to get from
      Returns:
      the value
    • asFunction

      default Function<ENTITY,Long> asFunction()
      Description copied from interface: Getter
      Returns this object, typed as a Function method.
      Specified by:
      asFunction in interface Getter<ENTITY>
      Returns:
      this object as a function