Package com.tailf.navu
Class NavuChange
Object
com.tailf.navu.NavuChange
This class handles changes on a node. The changes can be CREATE or
DELETE if the node has been created or deleted and MODIFY if a
subordinate node has been created, deleted or modified.
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Adds a node.boolean
Checks if a node is already contained by the change.get
(int index) Returns a node at a certain position.getKey()
boolean
isEmpty()
iterator()
void
Sets the change type.int
size()
subList
(int startIndex, int stopindex) Object[]
toArray()
Converts the list of changes to an array.<T> T[]
toArray
(T[] a)
-
Method Details
-
get
Returns a node at a certain position.- Parameters:
index
- the index to use- Returns:
- the node at this position. null if no node exists.
-
getChange
- Returns:
- the change type.
-
getKey
- Returns:
- the key of the change.
-
isEmpty
public boolean isEmpty()- Returns:
- true if no changes exists.
-
iterator
- Returns:
- an iterator of the changes.
-
setChange
Sets the change type.- Parameters:
op
- change type.
-
size
public int size()- Returns:
- the number of changes.
-
subList
- Parameters:
startIndex
- first index of the sub-liststopindex
- stop index (exclusive)- Returns:
- a subList
-
toArray
Converts the list of changes to an array.- Returns:
- an array of objects.
-
toArray
public <T> T[] toArray(T[] a) - Type Parameters:
T
-- Parameters:
a
-- Returns:
- an array of type T.