Interface EntityComponent<E>

Type Parameters:
E - the type of the entity a EntityComponent can belong to.
All Known Subinterfaces:
IBackReference<E>, IBaseBackReference, IBaseReference, IBaseValueField<V>, IField, IMultiBackReference<E>, IMultiReference<E>, IMultiValueField<V>, IOptionalBackReference<E>, IOptionalReference<E>, IOptionalValueField<V>, IReference<E>, IValueField<V>
All Known Implementing Classes:
AbstractBaseBackReference, AbstractBaseReference, AbstractBaseValueField, AbstractField, BackReference, MultiBackReference, MultiReference, MultiValueField, OptionalBackReference, OptionalReference, OptionalValueField, Reference, ValueField

public interface EntityComponent<E>
A EntityComponent can belong to an entity.
Author:
Silvan Wyss
  • Method Details

    • belongsToEntity

      boolean belongsToEntity()
      Returns:
      true if the current EntityComponent belongs to an entity, false otherwise.
    • getStoredParentEntity

      E getStoredParentEntity()
      Returns:
      the entity of the current EntityComponent.
      Throws:
      RuntimeException - if the current EntityComponent does not belong to an entity.