Class: CollectionIterator

Portal Home

CMaps Analytics Online Portal

Javascript API Docs

How to Use CMaps API

Working with Data

Working with Layers

Including Custom Components

View API Docs

Request Access

Developer Resources

Developers Introduction to CMaps Designer

Strategies for Integrating CMaps Analytics

Embed and Connect CMaps Templates in HTML5 App

Creating custom CMaps Analytics Plugin & Property Sheet

Security Guide

CollectionIterator

Provides convenient functionality for dealing with Arrays

Constructor

new CollectionIterator()

Properties:
Name Type Description
array Array reference to the underlying data
position Number cursor position
Version:
  • 4.1.00

Methods

addItem(obj)

addItem
Parameters:
Name Type Description
obj Object

allValuesInSourceToString()

allValuesInSourceToString

allValuesInSourceTrimmedAndToLowercase()

allValuesInSourceTrimmedAndToLowercase

cloneArray(arr) → {Array}

cloneArray
Parameters:
Name Type Description
arr Array
Returns:
Type
Array

cloneSourceArray() → {Array}

cloneSourceArray
Returns:
Type
Array

contains(value) → {Boolean}

contains
Parameters:
Name Type Description
value Object
Returns:
Type
Boolean

containsDuplicateValue(value) → {Boolean}

containsDuplicateValue
Parameters:
Name Type Description
value Object
Returns:
Type
Boolean

containsDuplicateValues() → {Boolean}

containsDuplicateValues
Returns:
Type
Boolean

containsStringValueCaseInsensitive(value) → {Boolean}

containsStringValueCaseInsensitive
Parameters:
Name Type Description
value String
Returns:
Type
Boolean

createArraySeededWithDefaultValues(numValues, value)

createArraySeededWithDefaultValues
Parameters:
Name Type Description
numValues Number
value Object

current() → {Object}

current
Returns:
Type
Object

deleteEverythingAfter(numValues, value)

deleteEverythingAfter
Parameters:
Name Type Description
numValues Number
value Object

deleteEverythingBefore(index)

deleteEverythingBefore
Parameters:
Name Type Description
index Number

deleteObjectAt(pos)

deleteObjectAt
Parameters:
Name Type Description
pos Number

deleteObjectAtCurrentPosition()

deleteObjectAtCurrentPosition

doesntHaveItemAt(pos) → {Boolean}

doesntHaveItemAt
Parameters:
Name Type Description
pos Number
Returns:
Type
Boolean

getAllDuplicateValues() → {Array}

getAllDuplicateValues
Returns:
Type
Array

getColumnFromObjsByField(fieldName) → {Array}

getColumnFromObjsByField
Parameters:
Name Type Description
fieldName String
Returns:
Type
Array

getDistinctValues() → {Array}

getDistinctValues
Returns:
Type
Array

getFirstIndexWhereAnyOfTheValuesFound(values) → {Number}

getFirstIndexWhereAnyOfTheValuesFound
Parameters:
Name Type Description
values Array
Returns:
Type
Number

getFirstIndexWhereValueFound(value) → {Number}

getFirstIndexWhereValueFound
Parameters:
Name Type Description
value Object
Returns:
Type
Number

getItemAt(pos) → {Object}

getItemAt
Parameters:
Name Type Description
pos Number
Returns:
Type
Object

getItemAtOrAlt(pos, altValue) → {Object}

getItemAtOrAlt
Parameters:
Name Type Description
pos Number
altValue Object
Returns:
Type
Object

getItemAtOrReturnAlternateValue(pos, altValue) → {Object}

getItemAtOrReturnAlternateValue
Parameters:
Name Type Description
pos Number
altValue Object
Returns:
Type
Object

getLast() → {Object}

getLast
Returns:
Type
Object

getLength() → {Number}

getLength
Returns:
Type
Number

getMax() → {Number}

getMax
Returns:
Type
Number

getMed() → {Number}

getMed
Returns:
Type
Number

getMedIx() → {Number}

getMedIx
Returns:
Type
Number

getMin() → {Number}

getMin
Returns:
Type
Number

getNumericSortedArrayObjsByFieldAscending(fieldName) → {Array}

getNumericSortedArrayObjsByFieldAscending
Parameters:
Name Type Description
fieldName String
Returns:
Type
Array

getNumericSortedArrayObjsByFieldDescending(fieldName) → {Array}

getNumericSortedArrayObjsByFieldDescending
Parameters:
Name Type Description
fieldName String
Returns:
Type
Array

getObjsWhereFieldHasVal() → {Array}

getObjsWhereFieldHasVal
Returns:
Type
Array

getObjWhereFieldHasVal() → {Array}

getObjWhereFieldHasVal
Returns:
Type
Array

getObjWhereFieldsHaveVals() → {Array}

getObjWhereFieldsHaveVals
Returns:
Type
Array

getPosition() → {Number}

getPosition
Returns:
Type
Number

getPreviousPosition() → {Number}

getPreviousPosition
Returns:
Type
Number

getSortedArrayObjsByFieldAscending(fieldName) → {Array}

getSortedArrayObjsByFieldAscending
Parameters:
Name Type Description
fieldName String
Returns:
Type
Array

getSortedArrayObjsByFieldDescending(fieldName) → {Array}

getSortedArrayObjsByFieldDescending
Parameters:
Name Type Description
fieldName String
Returns:
Type
Array

getSum() → {Number}

getSum
Returns:
Type
Number

getValueIndex(value) → {Number}

getValueIndex
Parameters:
Name Type Description
value Object
Returns:
Type
Number

hasArrayAtPosition(pos) → {Boolean}

hasArrayAtPosition
Parameters:
Name Type Description
pos Number
Returns:
Type
Boolean

hasItemAt(pos) → {Boolean}

hasItemAt
Parameters:
Name Type Description
pos Number
Returns:
Type
Boolean

hasNext() → {Boolean}

hasNext
Returns:
Type
Boolean

hasOneLeft() → {Boolean}

hasOneLeft
Returns:
Type
Boolean

insertItemAt(obj, index)

insertItemAt
Parameters:
Name Type Description
obj Object
index Number

next() → {Object}

next
Returns:
Type
Object

padEndOfArrayWithDefaultValues(arr, length, value) → {Array}

padEndOfArrayWithDefaultValues
Parameters:
Name Type Description
arr Array
length Number
value Object
Returns:
Type
Array

previous() → {Object}

previous
Returns:
Type
Object

resetPosition()

resetPosition

sampleNext() → {Object}

sampleNext
Returns:
Type
Object

setItemAt(obj, index)

setItemAt
Parameters:
Name Type Description
obj Object
index Number

sortAscending()

sortAscending

sortDescending()

sortDescending

sortPlainAscending()

sortPlainAscending