Interface StoredEntityData


  • public interface StoredEntityData
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      <T> @Nullable T get​(java.lang.Class<T> objectClass)
      Returns an object from the storage if present.
      boolean has​(java.lang.Class<?> objectClass)
      Checks if the storage contains an object of the given type.
      void put​(java.lang.Object object)
      Stores an object based on its class.
      EntityType type()
      Returns the entity type of the stored entity.
    • Method Detail

      • type

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

        boolean has​(java.lang.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​(java.lang.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
      • put

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