|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectmodhelxs.abstractsemantics.NamedEntity
public abstract class NamedEntity
Implementation of a Named entity for the abstract semantics of ModHel'X.
| Field Summary | |
|---|---|
private java.lang.String |
name_
Name of the entity. |
private java.util.Map<java.lang.String,java.lang.Object> |
properties_
Properties of the entity. |
| Constructor Summary | |
|---|---|
NamedEntity(java.lang.String name,
java.lang.Object... properties)
|
|
| Method Summary | ||
|---|---|---|
java.lang.String |
getName()
Get the name of this entity. |
|
java.util.Collection<java.lang.String> |
getProperties()
Get the properties of this entity. |
|
|
getProperty(java.lang.String name,
java.lang.Class<T> type)
Get property name of the entity as a Class. |
|
boolean |
hasProperty(java.lang.String name)
Tell if the entity has property name. |
|
|
removeProperty(java.lang.String name)
Remove property name of the entity. |
|
void |
setName(java.lang.String name)
Set the name of this entity. |
|
void |
setProperties(java.lang.Object... pairs)
Set properties of the entity using a String/value list. |
|
|
setProperty(java.lang.String name,
T value)
Set property name of the entity to value. |
|
java.lang.String |
toString()
|
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
private java.lang.String name_
private java.util.Map<java.lang.String,java.lang.Object> properties_
| Constructor Detail |
|---|
public NamedEntity(java.lang.String name,
java.lang.Object... properties)
| Method Detail |
|---|
public java.lang.String getName()
NamedEntity
getName in interface NamedEntitypublic void setName(java.lang.String name)
NamedEntity
setName in interface NamedEntitypublic java.util.Collection<java.lang.String> getProperties()
NamedEntity
getProperties in interface NamedEntitypublic boolean hasProperty(java.lang.String name)
name.
public <T> T getProperty(java.lang.String name,
java.lang.Class<T> type)
name of the entity as a Class.
public <T> void setProperty(java.lang.String name,
T value)
name of the entity to value.
public void setProperties(java.lang.Object... pairs)
String/value list.
public <T> void removeProperty(java.lang.String name)
name of the entity.
public java.lang.String toString()
toString in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||