org.loom.binding
Class ListNode
java.lang.Object
org.loom.binding.Node
org.loom.binding.AbstractCollectionNode
org.loom.binding.ListNode
public class ListNode
- extends AbstractCollectionNode
A Node representing a List
Method Summary |
protected java.lang.Object |
ensureCapacity(java.lang.Object container,
java.lang.Object collection,
int minSize)
Checks that the collection has at least the expected size. |
protected java.lang.Object |
get(java.lang.Object list,
int index)
|
protected int |
getSize(java.lang.Object list)
|
protected void |
set(java.lang.Object list,
int index,
java.lang.Object item)
Adds an item to the list |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ListNode
public ListNode()
get
protected java.lang.Object get(java.lang.Object list,
int index)
- Specified by:
get
in class AbstractCollectionNode
- Returns:
- the required item in the list
getSize
protected int getSize(java.lang.Object list)
- Specified by:
getSize
in class AbstractCollectionNode
- Parameters:
list
- the List/array instance
- Returns:
- the size of the list
set
protected void set(java.lang.Object list,
int index,
java.lang.Object item)
- Description copied from class:
AbstractCollectionNode
- Adds an item to the list
- Specified by:
set
in class AbstractCollectionNode
ensureCapacity
protected java.lang.Object ensureCapacity(java.lang.Object container,
java.lang.Object collection,
int minSize)
- Description copied from class:
AbstractCollectionNode
- Checks that the collection has at least the expected size. Enlarge it if it doesn't
- Specified by:
ensureCapacity
in class AbstractCollectionNode
- Parameters:
container
- the instance that contains this collection propertycollection
- the collection to checkminSize
- the minimum size required
- Returns:
- the original collection if it does have the minimum size required, or a
bigger copy if not.