Class: AttributeType

AttributeType

AttributeTypes defines name, type (string, double,...) an associated parameter of an attribute.

new AttributeType()

Constructor: Initializes the ParameterList.

Requires

  • module:easejs
  • module:ParameterList

Members

protectednamestring

Name of the Attribute

protectedparameterListParameterList

Name of the Attribute

protectedtypestring

Defines the type of the Attribute (i.e String, Double,...)

Methods

addParameter(_parameter)

Adds a parameter.
Name Type Description
_parameter Parameter Parameter

virtualequals(_attributeType){boolean}

Compares this instance with the given one.
Name Type Description
_attributeType AttributeType AttributeType that should be compared

getIdentifier(){String}

Returns an identifier that uniquely describes the attribute type and its parameters. The identifier can be used to compare two attribute types.
Format: (AttributeName:AttributeType)#[FirstParameterName:FirstParameterValue]…
Example
 (CI_USER_LOCATION_DISTANCE:FLOAT)#[CP_TARGET_LATITUDE:52][CP_TARGET_LONGITUDE:13][CP_UNIT:KILOMETERS]
Returns the name.
Returns the parameters.
Returns the type.
Sets the name.
Name Type Description
_name string Name

setParameters(_parameters)

Adds a list of Parameter.
Name Type Description
_parameters ParameterList ParameterList
Sets the type.
Name Type Description
_type string Type

virtualtoString(){String}

Returns a string that describes the attribute type.
Builder for name.
Name Type Description
_name String Name

withParameters(_parameterList){AttributeType}

Builder for parameterList.
Name Type Description
_parameterList ParameterList | Array ParameterList

withParameters(_parameter){AttributeType}

Builder for one parameter.
Name Type Description
_parameter Parameter Parameter
Builder for type.
Name Type Description
_type String Type