|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.esa.beam.framework.datamodel.ProductNodeList<T>
public final class ProductNodeList<T extends ProductNode>
A type-safe list for elements of the type ProductNode.
| Constructor Summary | |
|---|---|
ProductNodeList()
Constructs a new list named nodes. |
|
| Method Summary | |
|---|---|
void |
add(int index,
T node)
Inserts a new node to this list at the given index. |
boolean |
add(T node)
Adds a new node to this list. |
void |
clearRemovedList()
Clears the internal removed product nodes list. |
boolean |
contains(String name)
Tests if this list contains a node with the given name. |
boolean |
contains(T node)
Tests if this list contains the given node. |
void |
copyInto(T[] array)
Copies the product nodes of this product node list into the specified array. |
ProductNodeList<T> |
createSubset(ProductNodeFilter<T> filter)
Creates a subset of this list using the given filter. |
void |
dispose()
Releases all of the resources used by this object instance and all of its owned children. |
T |
get(String name)
Gets the element with the given name. |
T |
getAt(int index)
|
T |
getByDisplayName(String displayName)
Gets the element with the given display name. |
String[] |
getDisplayNames()
Gets the display names of all nodes contained in this list. |
String[] |
getNames()
Gets the names of all nodes contained in this list. |
Collection<T> |
getRemovedNodes()
Gets all removed product nodes. |
int |
indexOf(String name)
Gets the index of the node with the given name. |
int |
indexOf(T node)
Gets the index of the given node. |
boolean |
remove(T node)
Removes the given node from this list. |
void |
removeAll()
Removes all nodes from this list. |
int |
size()
|
ProductNode[] |
toArray()
Returns the list of named nodes as an array. |
T[] |
toArray(T[] array)
Returns the list of named nodes as an array. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ProductNodeList()
| Method Detail |
|---|
public final int size()
public final T getAt(int index)
index - the index, must be in the range zero to size()
public final String[] getNames()
nullpublic String[] getDisplayNames()
nullProductNode.getDisplayName()public final T get(String name)
name - the name of the node, must not be null
null if a node with the given name is not contained in this
list
IllegalArgumentException - if the name is nullpublic T getByDisplayName(String displayName)
displayName - the display name of the node, must not be null
null if a node with the given display name is not contained in this
list
IllegalArgumentException - if the display name is nullProductNode.getDisplayName()public final boolean contains(String name)
name - the name of the node, must not be null
IllegalArgumentException - if the name is nullpublic final boolean contains(T node)
node - the node
IllegalArgumentException - if the node is nullpublic final boolean add(T node)
null nodes are not added to this list.
node - the node to be added, ignored if null
public final void add(int index,
T node)
null nodes are not added to this
list.
node - the node to be added, ignored if nullindex - the insert index
ArrayIndexOutOfBoundsException - if the index was invalid.public void clearRemovedList()
public Collection<T> getRemovedNodes()
public final boolean remove(T node)
node - the node to be removed, ignored if null
true if the node is a member of this list and could successfully be removed,
false otherwisepublic final void removeAll()
public final void dispose()
This method should be called only if it is for sure that this object instance will never be used again. The
results of referencing an instance of this class after a call to dispose() are undefined.
public ProductNodeList<T> createSubset(ProductNodeFilter<T> filter)
filter - the product node filter to be used, if null a clone of this list is created
public final ProductNode[] toArray()
nullpublic final T[] toArray(T[] array)
array - the array into which the elements of the list are to be stored, if it is big enough; otherwise, a
new array of the same runtime type is allocated for this purpose.
nullpublic final void copyInto(T[] array)
array - the array into which the product nodes get copied.
NullPointerException - if the given array is null.
IndexOutOfBoundsException - if the given array is to small.public final int indexOf(String name)
name - the name of the node, must not be null
-1 if a node with the given name is not
contained in this list
IllegalArgumentException - if the name is nullpublic final int indexOf(T node)
node - the node to get the index, must not be null
-1 if the node is not contained in this list
IllegalArgumentException - if the node is null
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||