Class jala.ListRenderer.ArrayList
Object
|
+--jala.ListRenderer.ArrayList
- class
jala.ListRenderer.ArrayList
A simple wrapper around an array to use in conjunction
with jala.ListRenderer. This wrapper can either handle complete arrays
or subsections of an array. In the latter case the wrapper needs offset
and total size information as argument to mimick a complete array.
Defined in ListRenderer.js
Field Summary |
Number |
length
The length of this ArrayList instance. |
Number |
offset
The offset of this ArrayList instance. |
Method Summary |
Object
|
get(<Number> idx)
Returns the element at the index position passed
as argument.
|
Boolean
|
isSubset()
Returns true if this ArrayList is a subsection of a bigger array
|
Number
|
size()
Returns the size of this ArrayList, which is either
the length of the wrapped array or the total size
passed as argument to the constructor (in case the wrapped
array is just a subsection).
|
Number
|
subsetSize()
Returns the actual size of this ArrayList's wrapped array.
|
length
Number length
The length of this ArrayList instance.
offset
Number offset
The offset of this ArrayList instance. This might be > zero for
ArrayList instances wrapping just a subsection, that is
mimicking a bigger list.
jala.ListRenderer.ArrayList
jala.ListRenderer.ArrayList(<Array> arr, <Number> offset, <Number> total)
Creates a new ArrayList instance.
Parameters:
arr
- The array (or a subsection of an array) to wrap
offset
- An optional offset to use (mandatory if the array is just a subsection).
total
- An optional total size of the array. This argument is mandatory if the wrapped array is just a subsection.
Returns:
A newly created ArrayList instance
get
Object get(<Number> idx)
Returns the element at the index position passed
as argument. If the wrapped array is just a subsection
the index position passed will be corrected using
the offset.
Parameters:
idx
- The index position of the element to return
Returns:
The element at the given index position
isSubset
Boolean isSubset()
Returns true if this ArrayList is a subsection of a bigger array
Returns:
True if this ArrayList is a subsection of a bigger array
size
Number size()
Returns the size of this ArrayList, which is either
the length of the wrapped array or the total size
passed as argument to the constructor (in case the wrapped
array is just a subsection).
Returns:
The size of this ArrayList instance
subsetSize
Number subsetSize()
Returns the actual size of this ArrayList's wrapped array.
Returns:
The actual size of this ArrayList's wrapped array.
Documentation generated by
JSDoc on Tue Jan 8 15:45:31 2008