new StaticArrayList(valueType)
Creates an instance of StaticArrayList
.
Parameters:
Name | Type | Description |
---|---|---|
valueType |
function |
- Implements:
Extends
Methods
-
add(element)
-
Add an element at the end of the list.
Parameters:
Name Type Description element
T The element to add.
- Inherited From:
- Overrides:
-
clear()
-
Clears the list by removing all its elements.
- Inherited From:
- Overrides:
-
forEach(onAdd [, onRemove])
-
Registers callbacks to be called every time an entry is added or removed from this collection.
Note: If the collection is not empty, the 'onAdd' callback will be invoked for each existing entry.
Parameters:
Name Type Argument Description onAdd
olympe.df.Enumerable.AddItemCallback The callback to invoke when an entry is added.
onRemove
olympe.df.Enumerable.RemoveItemCallback <optional>
The callback to invoke when an entry is removed.
- Inherited From:
- Overrides:
- Implements:
-
forEachCurrentValue(callback)
-
Executes the specified callback on each current item. If the callbacks returns
false
then it will break out of the loop.Note: This method does not create a node for each callback call. It is just simple iteration on all values present in the enumerable at the time of the method call.
Parameters:
Name Type Description callback
olympe.df.Enumerable.AddItemCallback The function to invoke on each value.
- Inherited From:
- Overrides:
- Implements:
-
forEachLimited(start, count, onAdd [, onRemove])
-
Registers callbacks to be called every time an entry whose rank is greater than or equal to start and smaller than start plus count is added or removed from this collection.
Note: If the collection is not empty, the 'onAdd' callback will be immediately invoked for each existing entry.
Parameters:
Name Type Argument Description start
olympe.df.PONumber | number starting rank for the selection.
count
olympe.df.PONumber | number number of entries in the selection.
onAdd
olympe.df.Enumerable.AddItemCallback.<T> The callback to invoke when an entry is added.
onRemove
olympe.df.Enumerable.RemoveItemCallback <optional>
The callback to invoke when an entry is removed.
- Inherited From:
- Overrides:
- Implements:
-
get(key)
-
Gets the value associated with a specific key.
Parameters:
Name Type Description key
string | olympe.df.POString the key whose associated value is to be returned.
- Inherited From:
- Overrides:
- Implements:
Returns:
the value to which the specified key is mapped, or undefined if this map contains no mapping for the key.
- Type
- olympe.df.Proxy.<T> | T
-
getAt(rank)
-
Gets the value of the entry at the specified rank.
Parameters:
Name Type Description rank
olympe.df.PONumber | number the rank of the entry.
- Inherited From:
- Overrides:
- Implements:
Returns:
the value of the entry at that rank.
- Type
- olympe.df.Proxy.<T> | T
-
getCurrent(key)
-
Gets the current value associated with a specific key, that is the value at the time of the method call.
Parameters:
Name Type Description key
string | olympe.df.POString the key whose associated value is to be returned.
- Inherited From:
- Overrides:
- Implements:
Returns:
the current value to which the specified key is mapped, or undefined if this map contains no mapping for the key.
- Type
- T | undefined
-
getCurrentAt(rank)
-
Gets the value of the entry at the specified rank at the time of the method call.
Parameters:
Name Type Description rank
olympe.df.ONumber | number the rank of the entry.
- Inherited From:
- Overrides:
- Implements:
Returns:
the value of the entry at that rank.
- Type
- T | undefined
-
getCurrentKeyAt(rank)
-
Gets the key of the item at the specified rank at the time of the method call.
Parameters:
Name Type Description rank
olympe.df.ONumber | number the rank of the entry.
- Inherited From:
- Overrides:
- Implements:
Returns:
the key of the entry at that rank.
- Type
- string | undefined
-
getCurrentRank(key)
-
Gets the rank of the specified entry at the time of the method call.
Parameters:
Name Type Description key
string the key of the entry.
- Inherited From:
- Overrides:
- Implements:
Returns:
the rank of the entry.
- Type
- number | undefined
-
getCurrentSize()
-
Gets the number of key-value mappings in this map at the time of the method call.
- Inherited From:
- Overrides:
- Implements:
Returns:
the current number of key-value mappings in this map
- Type
- number
-
getFirst()
-
Gets the value of the first entry in the collection.
- Inherited From:
- Overrides:
- Implements:
Returns:
the value of the first entry.
- Type
- olympe.df.Proxy.<T> | T
-
getFirstKey()
-
Gets the key for the first entry in the collection.
- Inherited From:
- Overrides:
- Implements:
Returns:
the key for the first entry
- Type
- olympe.df.Proxy.<string> | string
-
getKeyAt(rank)
-
Gets the key of the entry at the specified rank.
Parameters:
Name Type Description rank
olympe.df.PONumber | number the rank of the entry.
- Inherited From:
- Overrides:
- Implements:
Returns:
the key of the entry at that rank.
- Type
- olympe.df.Proxy.<string> | string
-
getKeys()
-
Gets an array containing all the keys ordered by rank.
- Inherited From:
- Overrides:
- Implements:
Returns:
an Array of the keys.
- Type
- Array | olympe.df.Proxy
-
getRank(key)
-
Gets the rank of of the entry associated with a specific key.
Parameters:
Name Type Description key
olympe.df.POString | string the key of the entry.
- Inherited From:
- Overrides:
- Implements:
Returns:
the rank of the entry.
- Type
- olympe.df.PONumber
-
getSize()
-
Gets the number of key-value mappings in this collection.
- Inherited From:
- Overrides:
- Implements:
Returns:
the number of key-value mappings in this map
- Type
- olympe.df.PONumber
-
getValueType()
-
Gets the type of the objects stored in this Map.
- Inherited From:
- Overrides:
- Implements:
Returns:
Value type constructor.
- Type
- function
-
has(key)
-
Checks whether the specified key is present in the collection.
Parameters:
Name Type Description key
string | olympe.df.POString the key whose presence in this map is to be tested.
- Inherited From:
- Overrides:
- Implements:
Returns:
true if this map contains a mapping for the specified key.
- Type
- olympe.df.POBoolean
-
hasCurrent(key)
-
Checks whether the specified key is present in the collection at the time of the method call.
Parameters:
Name Type Description key
string the key whose presence in this map is to be tested.
- Inherited From:
- Overrides:
- Implements:
Returns:
true if this map contains a mapping for the specified key.
- Type
- boolean
-
insert(index, element)
-
Inserts an element at the given index. The elements already present at the given index and above are shifted up.
Parameters:
Name Type Description index
number The insertion index.
element
T The element to insert.
- Inherited From:
- Overrides:
-
remove(index)
-
Deletes the index-th element of the list. The deleted element is returned. Element(s) present at higher indexes are shifted down.
Parameters:
Name Type Description index
number The index of the element to remove.
- Inherited From:
- Overrides:
Returns:
The removed element.
- Type
- olympe.df.Proxy.<T> | T
-
set(index, element)
-
Set the index-th element of the list to element. The existing element at this index, if any, is returned.
Parameters:
Name Type Description index
number The index.
element
T The element
- Inherited From:
- Overrides:
Returns:
The element.
- Type
- olympe.df.Proxy.<T> | T
-
setValueType(valueType)
-
Sets the type of the objects that can be stored in this Map.
Parameters:
Name Type Description valueType
function Value type constructor.
- Inherited From:
- Overrides:
- Implements:
-
toOString()
-
Provides a text representation of the list as an
olympe.df.OString
object.Returns:
The
OString
representation.- Type
- olympe.df.OString
-
toString()
-
Provides a text representation of the list.
Returns:
The string representation.
- Type
- string