Interface StoredEntityData
public interface StoredEntityData
-
Method Summary
Modifier and TypeMethodDescription<T> @Nullable T
Returns an object from the storage if present.boolean
Checks if the storage contains an object of the given type.void
Stores an object based on its class.<T> @Nullable T
Removes and returns an object from the storage if present.type()
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
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
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
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
Stores an object based on its class.- Parameters:
object
- object to store
-