Class: ColumnValueSet

ColumnValueSet()

A 'bridge' API to implement the necessary functionality of the ES6 Set for interpreting cell values. A ColumnValueSet is passed to CellInterpreter or HTMLTableWrapperControl~populateCellValues when used in HTMLTableWrapperControls. If the Set constructor is defined, a Set will be used to back this ColumnValueSet, otherwise will fall back to an Array.

The ColumnValueSet#iterator function of this class implements the ES6 protocol for iterable objects (if the Symbol constructor is defined, this class implements the protocol fully). ColumnValueSets should be iterated via this function, regardless of whether ES6 semantics are available, as they aren't strictly necessary to consume iterators. E.g., given a ColumnValueSet columnValueSet:

var itr, itrVal, currentVal;

itr = columnValueSet.iterator();
while (!(itrVal = itr.next()).done) {
    currentVal = itrVal.value;
// ...

Constructor

new ColumnValueSet()

Source:

Classes

FallbackIterator

Members

fallback :boolean

Flag indicating whether this ColumnValueSet using an Array as its backing store due to the Set constructor not being available.

Type:
  • boolean
Source:

(private) values :Set|Array

Backing collection containing values added to this set from CellInterpreter or HTMLTableWrapperControl~populateCellValues implementations. If the Set constructor is defined, will be a Set, otherwise will fall back to an Array.

Type:
  • Set | Array
Source:

Methods

add(value, noTrimopt)

Adds the given value to this set. By default, the value is trimmed prior to being added, unless the noTrim parameter is passed, and evaluates to true.

Parameters:
Name Type Attributes Description
value string

Value to add to this set.

noTrim boolean <optional>

If true, value will be added to this set, as given, otherwise it will be trimmed first.

Source:

clear()

Clears all values from this ColumnValueSet.

Source:

iterator() → {Iterator}

Function that the ES6 protocol for iterable objects. Regardless of the backing data store, an ES6 Iterator will be returned.

Source:
Returns:

An object that implements the ES6 protocol for Iterators.

Type
Iterator