Interface TrackedEntity


public interface TrackedEntity
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the type of the stored entity.
    <T extends StorableObject>
    @Nullable T
    get(Class<T> objectClass)
    Returns an object from the storage if present.
    boolean
    has(Class<? extends StorableObject> objectClass)
    Checks if the storage contains an object of the given type.
    boolean
    Returns whether entity data has already been sent at least once for this entity.
    void
    Stores an object based on its class.
    <T extends StorableObject>
    @Nullable T
    remove(Class<T> objectClass)
    Removes and returns an object from the storage if present.
    void
    sentEntityData(boolean sentEntityData)
     
  • Method Details

    • entityType

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

      boolean has(Class<? extends StorableObject> 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 extends StorableObject> @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 extends StorableObject> @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(StorableObject object)
      Stores an object based on its class.
      Parameters:
      object - object to store
    • hasSentEntityData

      boolean hasSentEntityData()
      Returns whether entity data has already been sent at least once for this entity.
      Returns:
      whether entity data has already been sent at least once for this entity
    • sentEntityData

      void sentEntityData(boolean sentEntityData)