AttributeManager

Provides a class for managing Attribute.

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard
val count: Int

The number of Attribute managed by this AttributeManager.

Functions

Link copied to clipboard
fun add(attribute: Attribute, value: Int)

Add an attribute with a specified value.

fun add(attributeName: String, value: Int)

Add an attribute with a specified attributeName and value.

Link copied to clipboard

Get all Attribute managed by this AttributeManager.

Link copied to clipboard
fun getValue(attribute: Attribute): Int

Get the value of an attribute.

fun getValue(attributeName: String): Int

Get the value of an attribute from a specified attributeName.

Link copied to clipboard
fun remove(attribute: Attribute)

Remove an attribute.

fun remove(attributeName: String)

Remove an attribute with a specified attributeName.

Link copied to clipboard
fun removeAll()

Remove all attributes.

Link copied to clipboard
fun subtract(attribute: Attribute, value: Int)

Subtract a value from an attribute.

fun subtract(attributeName: String, value: Int)

Subtract a value from an attribute with a specified attributeName.

Link copied to clipboard

Get all Attribute and values managed by this AttributeManager.