Gridarta Editor
net.sf.gridarta.model.baseobject.Attributes Interface Reference

A set of key/value pairs. More...

+ Inheritance diagram for net.sf.gridarta.model.baseobject.Attributes:
+ Collaboration diagram for net.sf.gridarta.model.baseobject.Attributes:

Public Member Functions

double getAttributeDouble (@NotNull String attributeName)
 Returns an attribute value of this Archetype as double. More...
 
int getAttributeInt (@NotNull String attributeName)
 Returns an attribute value of this Archetype as int. More...
 
long getAttributeLong (@NotNull String attributeName)
 Returns an attribute value of this Archetype as long. More...
 
String getAttributeString (@NotNull String attributeName)
 Returns the requested attribute value of this GameObject as String. More...
 
boolean hasAttribute (@NotNull String attributeName)
 Returns whether an attribute name exists. More...
 
void removeAttribute (@NotNull String attributeName)
 Removes the String of an archetype attribute from the objectText. More...
 
void setAttributeInt (@NotNull String attributeName, int value)
 Sets an int value attribute. More...
 

Detailed Description

A set of key/value pairs.

Author
Andreas Kirschbaum

Definition at line 28 of file Attributes.java.

Member Function Documentation

◆ getAttributeDouble()

double net.sf.gridarta.model.baseobject.Attributes.getAttributeDouble ( @NotNull String  attributeName)

Returns an attribute value of this Archetype as double.

Parameters
attributeNamethe name of the attribute value to return
Returns
the attribute value or
0.0
(zero) if not found
See also
#getAttributeString(String)

◆ getAttributeInt()

int net.sf.gridarta.model.baseobject.Attributes.getAttributeInt ( @NotNull String  attributeName)

Returns an attribute value of this Archetype as int.

Parameters
attributeNamethe name of the attribute value to return
Returns
the attribute value or
0
(zero) if not found
See also
#getAttributeString(String)

◆ getAttributeLong()

long net.sf.gridarta.model.baseobject.Attributes.getAttributeLong ( @NotNull String  attributeName)

Returns an attribute value of this Archetype as long.

Parameters
attributeNamethe name of the attribute value to return
Returns
the attribute value or
0
(zero) if not found
See also
#getAttributeString(String)

◆ getAttributeString()

String net.sf.gridarta.model.baseobject.Attributes.getAttributeString ( @NotNull String  attributeName)

Returns the requested attribute value of this GameObject as String.

The attribute value is first searched in this GameObject. If the attribute value is not found and this GameObject is not an Archetype itself, the attribute value is searched in this GameObject's Archetype as well.

Parameters
attributeNamethe name of the attribute to search
Returns
the attribute value or an empty String ("") if no such attribute

◆ hasAttribute()

boolean net.sf.gridarta.model.baseobject.Attributes.hasAttribute ( @NotNull String  attributeName)

Returns whether an attribute name exists.

Parameters
attributeNamethe attribute name
Returns
whether the attribute name exists

◆ removeAttribute()

◆ setAttributeInt()

void net.sf.gridarta.model.baseobject.Attributes.setAttributeInt ( @NotNull String  attributeName,
int  value 
)

Sets an int value attribute.

Parameters
attributeNamethe name of the attribute to update
valuethe new value

Referenced by net.sf.gridarta.gui.panel.gameobjectattributes.ArchTab< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.direction().

+ Here is the caller graph for this function:

The documentation for this interface was generated from the following file: