src/lib/collections/sorted-list.js
function (value) {
        if (value === null || value === undefined) {
            return this.slot.keys.length;
        } else {
            assertType(value, Number);

            if (value !== this.slot.keys.length) {
                if (value < this.slot.size) {
                    error(ERROR_ARGUMENT_OUT_OF_RANGE);
                }

                this.slot.keys.length = value;
                this.slot.values.length = value;
            }
        }
    }
function (value) {
        if (value === null || value === undefined) {
            return this.slot.keys.length;
        } else {
            assertType(value, Number);

            if (value !== this.slot.keys.length) {
                if (value < this.slot.size) {
                    error(ERROR_ARGUMENT_OUT_OF_RANGE);
                }

                this.slot.keys.length = value;
                this.slot.values.length = value;
            }
        }
    }
function ( value ) { if ( value === null || value === undefined ) { return this . slot . keys . length ; } else { assertType ( value , Number ) ; if ( value !== this . slot . keys . length ) { if ( value < this . slot . size ) { error ( ERROR_ARGUMENT_OUT_OF_RANGE ) ; } this . slot . keys . length = value ; this . slot . values . length = value ; } } }
Gets or sets the number of elements that the SortedList can contain.
@param {Number} value The number of elements that the SortedList can contain.
@returns {Number}
Gets or sets the number of elements that the SortedList can contain .