T
- An enum type that defines the URNs this factory knows about.public abstract class AbstractEntityFactory<T extends java.lang.Enum<T>> extends java.lang.Object implements EntityFactory
Modifier | Constructor and Description |
---|---|
protected |
AbstractEntityFactory(java.lang.Class<T> clazz)
Constructor for AbstractEntityFactory.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String[] |
getKnownEntityURNs()
Get all entity urns understood by this factory.
|
protected java.util.EnumSet<T> |
getKnownEntityURNsEnum()
Get an EnumSet containing known entity URNs.
|
Entity |
makeEntity(java.lang.String urn,
EntityID id)
Create a new Entity.
|
protected abstract Entity |
makeEntity(T urn,
EntityID id)
Create a new Entity.
|
protected AbstractEntityFactory(java.lang.Class<T> clazz)
clazz
- The class of enum this factory uses.public java.lang.String[] getKnownEntityURNs()
EntityFactory
getKnownEntityURNs
in interface EntityFactory
public Entity makeEntity(java.lang.String urn, EntityID id)
EntityFactory
makeEntity
in interface EntityFactory
urn
- The urn of the entity to create.id
- The id of the new entity.protected java.util.EnumSet<T> getKnownEntityURNsEnum()