AttributeFactory()

new AttributeFactory()

Properties:
Name Type Description
attributes Map

Methods

add(name, base, formula)

Parameters:
Name Type Default Description
name string
base number
formula AttributeFormula null

create(name, delta) → {Attribute}

Parameters:
Name Type Default Description
name string
delta number 0
Returns:
Attribute

get(name) → {object}

Get a attribute definition. Use create if you want an instance of a attribute

Parameters:
Name Type Description
name string
Returns:
object

has()

See:
  • Map#has

validateAttributes()

Make sure there are no circular dependencies between attributes

Throws:

Error