domain~ Aggregation

A named aggregation.

Constructor

new Aggregation(name, level)

Constructor.

Parameters:
NameTypeDescription
namestring

the unique name for this precision

levelnumber

a relative aggregation level value

Extends

Members

level

Get the aggregate level value.

This is an alias for module:util~ComparableEnum#value.

name

Get the enum name.

value

Get the comparable value.

Methods

compareTo(other) → {number}

Compare two ComparableEnum objects based on their value values.

Parameters:
NameTypeDescription
otherComparableEnum

the object to compare to

Returns:

-1 if this.value is less than other.value, 1 if this.value is greater than other.value, 0 otherwise (when the values are equal)

Type: 
number

equals(value) → {boolean}

Test if a string is equal to this enum's name.

As long as enum values are consistently obtained from the module:util~Enum.enumValues array then enum instances can be compared with ===. If unsure, this method can be used to compare string values instead.

If value is passed as an actual Enum instance, then if that enum is the same class as this enum it's name is compared to this instance's name.

Parameters:
NameTypeDescription
valuestring | Enum

the value to test

Returns:

true if value is the same as this instance's name value

Type: 
boolean

(static) enumValues()