This is the basic ThyAPI Collection Element. With it, one can hold a collection of any Element.
This is the basic ThyAPI Collection Element. | |
Checks if the object is from the specified class type or from a class derivate from that. | |
Clears collection’s values. | |
Removes all elements from collection | |
Removes all elements from collection. | |
Populates a collection with the values of an array. | |
Returns an object with the contents of this thyCollection | |
Sets a default name for elements that are passed without name. | |
Adds a new element into the collection | |
Concatenate this collection with the one passed by parameter. | |
Removes an element of the collection | |
Removes an element of the collection | |
Removes an element of the collection | |
Gets the name of an element | |
Gets the index of an element | |
Returns a javascript object with the elements indexed by their names | |
Returns a javascript array with the elements indexed by their ids used internally | |
Returns the number of elements this collection has. | |
Returns the number of elements this collection has. | |
Returns an element by its index | |
Returns an element by its index (alias of getElementByIndex) | |
Returns an element by its name | |
Returns an element by its name (alias of getElementByName) | |
Gets the name of an element, given its index | |
Gets the name of an element, given its index (alias of getNameByIndex) | |
Gets the index of an element, given its name | |
Gets the index of an element, given its name (alias of getIndexByName) | |
Changes the name of an element | |
Changes the index of an element | |
Swaps the names and indexes of two elements | |
Swaps the names of two elements | |
Swaps the indexes of two elements | |
Returns a string representation of the collection |
p.concat = function( collection )
Concatenate this collection with the one passed by parameter.
collection | Another thyCollection |
Checks if the object is from the specified class type or from a class derivate from that.
p.isFromClass = function ( className )
Clears collection’s values.
p.clear = function ()
Removes all elements from collection
p.cleanUp = function ()
Populates a collection with the values of an array.
p.populate = function ( data )
Returns an object with the contents of this thyCollection
p.sweepOut = function()
Sets a default name for elements that are passed without name.
p.setDefaultName = function ( name )
Adds a new element into the collection
p.add = function ( elm, name, index )
Concatenate this collection with the one passed by parameter.
p.concat = function( collection )
Removes an element of the collection
p.removeByName = function ( name )
Removes an element of the collection
p.removeByIndex = function ( index )
Removes an element of the collection
p.remove = function ( elm, name, index )
Gets the name of an element
p.getElementName = function ( elm )
Gets the index of an element
p.getElementIndex = function ( elm )
Returns a javascript object with the elements indexed by their names
p.getNamedElements = function()
Returns a javascript array with the elements indexed by their ids used internally
p.getIndexedElements = function()
Returns the number of elements this collection has.
p.getElementsCount = function()
Returns an element by its index
p.getElementByIndex = function ( index )
Returns an element by its name
p.getElementByName = function ( name )
Gets the name of an element, given its index
p.getNameByIndex = function( index )
Gets the index of an element, given its name
p.getIndexByName = function( name )
Changes the name of an element
p.changeElementName = function ( info )
Changes the index of an element
p.changeElementIndex = function ( info, name_also )
Swaps the names and indexes of two elements
p.swapElements = function ( elm1, elm2 )
Swaps the names of two elements
p.swapNames = function ( elm1, elm2 )
Swaps the indexes of two elements
p.swapIndex = function ( elm1, elm2 )
Returns a string representation of the collection
p.toString = function ()