|
Gridarta Editor
|
A set of key/value attributes. More...
Inheritance diagram for net.sf.gridarta.model.baseobject.GameObjectText:
Collaboration diagram for net.sf.gridarta.model.baseobject.GameObjectText:Public Member Functions | |
| boolean | addObjectText (@NotNull final String line, @NotNull final AbstractBaseObject<?, ?, ?, ?> baseObject) |
| Appends a line to the object text. More... | |
| boolean | equals (@Nullable final Object obj) |
| GameObjectText () | |
| Creates a new instance. More... | |
| GameObjectText (@NotNull final GameObjectText gameObjectText) | |
| Creates a new instance as a copy of another instance. More... | |
| Collection< String > | getAttributeKeys () |
| Returns all attribute keys of this object. More... | |
| String | getAttributeValue (@NotNull final String attributeName) |
| Returns an attribute value by attribute name. More... | |
| String | getObjectText () |
| Returns the object text. More... | |
| int | hashCode () |
| boolean | hasObjectText () |
| Returns whether an object text is set. More... | |
| boolean | removeAttribute (@NotNull final String attributeName, @NotNull final AbstractBaseObject<?, ?, ?, ?> baseObject) |
| Removes an attribute. More... | |
| boolean | setAttributeValue (@NotNull final String attributeName, final boolean sameAsInArchetype, @NotNull final String value, @NotNull final AbstractBaseObject<?, ?, ?, ?> baseObject) |
| Updates an attribute's value. More... | |
| boolean | setObjectText (@NotNull final String objectText, @NotNull final AbstractBaseObject<?, ?, ?, ?> baseObject) |
| Sets the object text. More... | |
Private Member Functions | |
| void | clearAttributeCache () |
| Clears the attribute cache. More... | |
| String | getAttributeValueInt (@NotNull final String attributeName) |
| Returns the requested attribute value from the objectText. More... | |
Private Attributes | |
| final Map< String, String > | attributeCache = new HashMap<>() |
| Map which caches attributes for faster access. More... | |
| final StringBuilder | objectText = new StringBuilder() |
| The objectText with the differences from the Archetype. More... | |
Static Private Attributes | |
| static final long | serialVersionUID = 1L |
| The serial version UID. More... | |
A set of key/value attributes.
Definition at line 35 of file GameObjectText.java.
| net.sf.gridarta.model.baseobject.GameObjectText.GameObjectText | ( | ) |
Creates a new instance.
Definition at line 61 of file GameObjectText.java.
Referenced by net.sf.gridarta.model.baseobject.GameObjectText.equals().
Here is the caller graph for this function:| net.sf.gridarta.model.baseobject.GameObjectText.GameObjectText | ( | @NotNull final GameObjectText | gameObjectText | ) |
Creates a new instance as a copy of another instance.
| gameObjectText | the other instance |
Definition at line 68 of file GameObjectText.java.
| boolean net.sf.gridarta.model.baseobject.GameObjectText.addObjectText | ( | @NotNull final String | line, |
| @NotNull final AbstractBaseObject<?, ?, ?, ?> | baseObject | ||
| ) |
Appends a line to the object text.
| line | the line to append, may contain ' ' for appending multiple lines |
| baseObject | the game object to notify of changes |
Definition at line 139 of file GameObjectText.java.
References net.sf.gridarta.model.baseobject.GameObjectText.clearAttributeCache().
Referenced by net.sf.gridarta.model.baseobject.AbstractBaseObject< G, A, R, G >.addObjectText().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Clears the attribute cache.
Definition at line 75 of file GameObjectText.java.
Referenced by net.sf.gridarta.model.baseobject.GameObjectText.addObjectText(), and net.sf.gridarta.model.baseobject.GameObjectText.setObjectText().
Here is the caller graph for this function:| boolean net.sf.gridarta.model.baseobject.GameObjectText.equals | ( | @Nullable final Object | obj | ) |
Definition at line 192 of file GameObjectText.java.
References net.sf.gridarta.model.baseobject.GameObjectText.GameObjectText(), and net.sf.gridarta.model.baseobject.GameObjectText.objectText.
Here is the call graph for this function:| Collection<String> net.sf.gridarta.model.baseobject.GameObjectText.getAttributeKeys | ( | ) |
Returns all attribute keys of this object.
Definition at line 261 of file GameObjectText.java.
References net.sf.gridarta.utils.StringUtils.PATTERN_END_OF_LINE.
Referenced by net.sf.gridarta.model.baseobject.AbstractBaseObject< G, A, R, G >.getAttributeKeys().
Here is the caller graph for this function:| String net.sf.gridarta.model.baseobject.GameObjectText.getAttributeValue | ( | @NotNull final String | attributeName | ) |
Returns an attribute value by attribute name.
| attributeName | the attribute name |
Definition at line 85 of file GameObjectText.java.
References net.sf.gridarta.model.baseobject.GameObjectText.getAttributeValueInt().
Referenced by net.sf.gridarta.model.baseobject.AbstractBaseObject< G, A, R, G >.getAttributeValue().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Returns the requested attribute value from the objectText.
| attributeName | the name of the attribute to search |
Definition at line 103 of file GameObjectText.java.
References net.sf.gridarta.utils.StringUtils.PATTERN_END_OF_LINE.
Referenced by net.sf.gridarta.model.baseobject.GameObjectText.getAttributeValue().
Here is the caller graph for this function:| String net.sf.gridarta.model.baseobject.GameObjectText.getObjectText | ( | ) |
Returns the object text.
Definition at line 120 of file GameObjectText.java.
Referenced by net.sf.gridarta.model.baseobject.AbstractBaseObject< G, A, R, G >.getObjectText().
Here is the caller graph for this function:| int net.sf.gridarta.model.baseobject.GameObjectText.hashCode | ( | ) |
Definition at line 187 of file GameObjectText.java.
| boolean net.sf.gridarta.model.baseobject.GameObjectText.hasObjectText | ( | ) |
Returns whether an object text is set.
Definition at line 128 of file GameObjectText.java.
Referenced by net.sf.gridarta.model.baseobject.AbstractBaseObject< G, A, R, G >.isDefaultGameObject().
Here is the caller graph for this function:| boolean net.sf.gridarta.model.baseobject.GameObjectText.removeAttribute | ( | @NotNull final String | attributeName, |
| @NotNull final AbstractBaseObject<?, ?, ?, ?> | baseObject | ||
| ) |
Removes an attribute.
| attributeName | the attribute name |
| baseObject | the game object to notify of changes |
Definition at line 209 of file GameObjectText.java.
References net.sf.gridarta.utils.StringUtils.PATTERN_END_OF_LINE, and net.sf.gridarta.model.baseobject.GameObjectText.setObjectText().
Referenced by net.sf.gridarta.model.baseobject.AbstractBaseObject< G, A, R, G >.removeAttribute(), and net.sf.gridarta.model.baseobject.GameObjectText.setAttributeValue().
Here is the call graph for this function:
Here is the caller graph for this function:| boolean net.sf.gridarta.model.baseobject.GameObjectText.setAttributeValue | ( | @NotNull final String | attributeName, |
| final boolean | sameAsInArchetype, | ||
| @NotNull final String | value, | ||
| @NotNull final AbstractBaseObject<?, ?, ?, ?> | baseObject | ||
| ) |
Updates an attribute's value.
| attributeName | the attribute name |
| sameAsInArchetype | whether the new value is the same as in the archetype |
| value | the new value |
| baseObject | the game object to notify of changes |
Definition at line 230 of file GameObjectText.java.
References net.sf.gridarta.utils.StringUtils.PATTERN_END_OF_LINE, net.sf.gridarta.model.baseobject.GameObjectText.removeAttribute(), and net.sf.gridarta.model.baseobject.GameObjectText.setObjectText().
Referenced by net.sf.gridarta.model.baseobject.AbstractBaseObject< G, A, R, G >.setAttributeInt(), and net.sf.gridarta.model.baseobject.AbstractBaseObject< G, A, R, G >.setAttributeString().
Here is the call graph for this function:
Here is the caller graph for this function:| boolean net.sf.gridarta.model.baseobject.GameObjectText.setObjectText | ( | @NotNull final String | objectText, |
| @NotNull final AbstractBaseObject<?, ?, ?, ?> | baseObject | ||
| ) |
Sets the object text.
| objectText | the object text to set |
| baseObject | the game object to notify of changes |
Definition at line 162 of file GameObjectText.java.
References net.sf.gridarta.model.baseobject.GameObjectText.clearAttributeCache(), and net.sf.gridarta.utils.StringUtils.sortLines().
Referenced by net.sf.gridarta.model.baseobject.GameObjectText.removeAttribute(), net.sf.gridarta.model.baseobject.GameObjectText.setAttributeValue(), and net.sf.gridarta.model.baseobject.AbstractBaseObject< G, A, R, G >.setObjectText().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Map which caches attributes for faster access.
Key: attribute name value: attribute value
Definition at line 56 of file GameObjectText.java.
|
private |
The objectText with the differences from the Archetype.
Definition at line 49 of file GameObjectText.java.
Referenced by net.sf.gridarta.model.baseobject.GameObjectText.equals().
|
staticprivate |
The serial version UID.
Definition at line 40 of file GameObjectText.java.