Interface AttributeAccessor<X,Y>

Type Parameters:
X - The entity type
Y - The attribute type

public interface AttributeAccessor<X,Y>
A class to access the attribute of an entity.
Since:
1.4.1
Author:
Christian Beikov
  • Method Summary

    Modifier and Type
    Method
    Description
    get(X entity)
    Returns the attribute value of the given entity.
    getNullSafe(X entity)
    Returns the attribute value of the given entity or null if the entity is null.
    void
    set(X entity, Y value)
    Sets the attribute to the given value on the given entity.
  • Method Details

    • get

      Y get(X entity)
      Returns the attribute value of the given entity.
      Parameters:
      entity - The entity
      Returns:
      the attribute value
    • getNullSafe

      Y getNullSafe(X entity)
      Returns the attribute value of the given entity or null if the entity is null.
      Parameters:
      entity - The entity
      Returns:
      the attribute value or null if the entity is null
    • set

      void set(X entity, Y value)
      Sets the attribute to the given value on the given entity.
      Parameters:
      entity - The entity
      value - the attribute value