Package name.moore.kevin.ze.components
Class appliesto
java.lang.Object
name.moore.kevin.ze.components.appliesto
- All Implemented Interfaces:
com.simsilica.es.EntityComponent
Added to specification entities, this component indicates what the spec
entity is meant to build to eg a planetSpec has an appliesto = planet.class,
an engineSpec has appliesto = engine.class
It has no XML representation, an entity creates and sets this explicitly. A specification has (by definition?) no specification component of its own. The component also indicates some logistics of where something built with this spec should be delivered to. Since some entities can't be built (eg a planet) their spec doesn't require logistics info - it has a DELIVER.NOP
- Author:
- Kevin Moore
<dev@kevin.moore.name>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Classthe type of target entity this specification entity is going to describe.private booleanInternal flag set for spec entities that are collections of other specs. -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
appliesTo
the type of target entity this specification entity is going to describe. -
isComposite
private boolean isCompositeInternal flag set for spec entities that are collections of other specs.
-
-
Constructor Details
-
appliesto
Defaults to builder and deliver as NOP- Parameters:
aClass- target entity to be described eg engine.class
-
-
Method Details
-
getAppliesTo
- Returns:
- The class of entity (eg engine.class) that this applies to.
-
isIsComposite
public boolean isIsComposite()- Returns:
- true if has multiple parts.
-
setIsComposite
public void setIsComposite(boolean isComposite)- Parameters:
isComposite- mark this specification as a composite ie with multiple parts
-
toString
-