Attributes | Name and Description |
---|---|
|
caplin.core.OrderedSet(Array elements, String fieldToCompare)
|
Attributes | Name and Description |
---|---|
|
boolean
add(Object element, Number index)
Adds an item into this set. |
|
void
addAll(Array elements)
Adds all the items in the passed array to this set. |
|
void
clear()
Clears all items from the set. |
|
boolean
contains(Object element)
Tests to see if an item is in this set |
|
Object
get(Number index)
Gets the element at a specified index. |
|
Object
getByKey(key key)
Gets the element by a defined key |
|
Array
getContents()
Returns an Array with the same contents as the Set. |
|
void
getFieldToCompare()
|
|
void
getIndexOf(Object element)
Returns the index of the given element in the order. |
|
boolean
remove(Object element)
Removes an item from this set. |
|
void
removeAll(Array elements)
Removes all the items in the passed array from this set. |
|
int
size()
Returns the number of elements contained in the set. |
►
caplin.core.OrderedSet(Array elements, String fieldToCompare)
Array | elements | (Optional) an array whose elements are to be placed into this set. |
String | fieldToCompare | (Optional) the field name to use when comparing objects. |
►
boolean
add(Object element, Number index)
Adds an item into this set.
Object | element | the item to add. |
Number | index | (Optional) the index at which the item will be added. If not included, element will be added to the end of the set. |
►
void
addAll(Array elements)
Adds all the items in the passed array to this set.
Array | elements | the items to add to this set. |
►
void
clear()
Clears all items from the set.
►
boolean
contains(Object element)
Tests to see if an item is in this set
Object | element | the item to test. |
►
Object
get(Number index)
Gets the element at a specified index.
Number | index | the index to get. |
►
Object
getByKey(key key)
Gets the element by a defined key
key | key | the key used to retrieve item. |
►
Array
getContents()
Returns an Array with the same contents as the Set.
►
void
getFieldToCompare()
►
void
getIndexOf(Object element)
Returns the index of the given element in the order.
Object | element |
►
boolean
remove(Object element)
Removes an item from this set.
Object | element | the item to remove. |
►
void
removeAll(Array elements)
Removes all the items in the passed array from this set.
Array | elements | the items to remove from this set. |
►
int
size()
Returns the number of elements contained in the set.