Class: Delegation

DelegationSet. Delegation

new Delegation(preference, name)

A DelegationSet.Delegation holds a preference number and delegation name. Create a new DelegationSet.Delegation with the given values.
Parameters:
Name Type Description
preference number The preference number.
name Name The delegation name. This makes a copy of the name.
Source:

Methods

compare(other) → {number}

Compare this Delegation with other according to the ordering, based first on the preference number, then on the delegation name.
Parameters:
Name Type Description
other DelegationSet.Delegation The other Delegation to compare with.
Source:
Returns:
0 If they compare equal, -1 if this Delegation comes before other in the ordering, or 1 if this Delegation comes after.
Type
number

getName() → {Name}

Get the delegation name.
Source:
Returns:
The delegation name. NOTE: You must not change the name object - if you need to change it then make a copy.
Type
Name

getPreference() → {number}

Get the preference number.
Source:
Returns:
The preference number.
Type
number