public class GameObjectText
extends java.lang.Object
implements java.io.Serializable
| Constructor and Description |
|---|
GameObjectText()
Creates a new instance.
|
GameObjectText(GameObjectText gameObjectText)
Creates a new instance as a copy of another instance.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
addObjectText(java.lang.String line,
AbstractBaseObject<?,?,?,?> baseObject)
Appends a line to the object text.
|
boolean |
equals(java.lang.Object obj) |
java.util.Collection<java.lang.String> |
getAttributeKeys()
Returns all attribute keys of this object.
|
java.lang.String |
getAttributeValue(java.lang.String attributeName)
Returns an attribute value by attribute name.
|
java.lang.String |
getObjectText()
Returns the object text.
|
int |
hashCode() |
boolean |
hasObjectText()
Returns whether an object text is set.
|
boolean |
removeAttribute(java.lang.String attributeName,
AbstractBaseObject<?,?,?,?> baseObject)
Removes an attribute.
|
boolean |
setAttributeValue(java.lang.String attributeName,
boolean sameAsInArchetype,
java.lang.String value,
AbstractBaseObject<?,?,?,?> baseObject)
Updates an attribute's value.
|
boolean |
setObjectText(java.lang.String objectText,
AbstractBaseObject<?,?,?,?> baseObject)
Sets the object text.
|
public GameObjectText()
public GameObjectText(@NotNull
GameObjectText gameObjectText)
gameObjectText - the other instance@Nullable
public java.lang.String getAttributeValue(@NotNull
java.lang.String attributeName)
attributeName - the attribute namenull@NotNull public java.lang.String getObjectText()
public boolean hasObjectText()
public boolean addObjectText(@NotNull
java.lang.String line,
@NotNull
AbstractBaseObject<?,?,?,?> baseObject)
line - the line to append, may contain '\n' for appending multiple
linesbaseObject - the game object to notify of changespublic boolean setObjectText(@NotNull
java.lang.String objectText,
@NotNull
AbstractBaseObject<?,?,?,?> baseObject)
objectText - the object text to setbaseObject - the game object to notify of changespublic int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(@Nullable
java.lang.Object obj)
equals in class java.lang.Objectpublic boolean removeAttribute(@NotNull
java.lang.String attributeName,
@NotNull
AbstractBaseObject<?,?,?,?> baseObject)
attributeName - the attribute namebaseObject - the game object to notify of changespublic boolean setAttributeValue(@NotNull
java.lang.String attributeName,
boolean sameAsInArchetype,
@NotNull
java.lang.String value,
@NotNull
AbstractBaseObject<?,?,?,?> baseObject)
attributeName - the attribute namesameAsInArchetype - whether the new value is the same as in the
archetypevalue - the new valuebaseObject - the game object to notify of changes@NotNull public java.util.Collection<java.lang.String> getAttributeKeys()