Interface StoredEntityData


public interface StoredEntityData
  • Method Summary

    Modifier and Type
    Method
    Description
    <T> @Nullable T
    get(Class<T> objectClass)
    Returns an object from the storage if present.
    boolean
    has(Class<?> objectClass)
    Checks if the storage contains an object of the given type.
    void
    put(Object object)
    Stores an object based on its class.
    <T> @Nullable T
    remove(Class<T> objectClass)
    Removes and returns an object from the storage if present.
    Returns the entity type of the stored entity.
  • Method Details

    • type

      EntityType type()
      Returns the entity type of the stored entity.
      Returns:
      entity type
    • has

      boolean has(Class<?> objectClass)
      Checks if the storage contains an object of the given type.
      Parameters:
      objectClass - object class to check
      Returns:
      whether an object of the given type is in the storage
    • get

      <T> @Nullable T get(Class<T> objectClass)
      Returns an object from the storage if present.
      Type Parameters:
      T - object type
      Parameters:
      objectClass - class of the object to get
      Returns:
      object if present
    • remove

      <T> @Nullable T remove(Class<T> objectClass)
      Removes and returns an object from the storage if present.
      Type Parameters:
      T - object type
      Parameters:
      objectClass - class of the object to remove
      Returns:
      removed object if present
    • put

      void put(Object object)
      Stores an object based on its class.
      Parameters:
      object - object to store