src/composites/Association.js
function Association(key, value) {
    abstractions.Composite.call(this, utilities.types.ASSOCIATION);
    key = this.convert(key);
    value = this.convert(value);

    // access to this component's attributes is tightly controlled
    this.getKey = function() { return key; };
    this.getValue = function() { return value; };
    this.setValue = function(newValue) {
        newValue = this.convert(newValue);
        const oldValue = value;
        value = newValue;
        return oldValue;
    };

    return this;
}
function Association(key, value) {
    abstractions.Composite.call(this, utilities.types.ASSOCIATION);
    key = this.convert(key);
    value = this.convert(value);

    // access to this component's attributes is tightly controlled
    this.getKey = function() { return key; };
    this.getValue = function() { return value; };
    this.setValue = function(newValue) {
        newValue = this.convert(newValue);
        const oldValue = value;
        value = newValue;
        return oldValue;
    };

    return this;
}
function Association ( key , value ) { abstractions . Composite . call ( this , utilities . types . ASSOCIATION ) ; key = this . convert ( key ) ; value = this . convert ( value ) ; // access to this component's attributes is tightly controlled this . getKey = function ( ) { return key ; } ; this . getValue = function ( ) { return value ; } ; this . setValue = function ( newValue ) { newValue = this . convert ( newValue ) ; const oldValue = value ; value = newValue ; return oldValue ; } ; return this ; }
PUBLIC FUNCTIONS 
This constructor creates a new key-value association.

@param {String|Number|Boolean|Component} key The key of the association.
@param {String|Number|Boolean|Component} value The value associated with the key.
@returns {Association} A new association.
PUBLIC FUNCTIONS This constructor creates a new key - value association .