|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.dhmp.util.AbstractCollection
org.dhmp.util.BasicHierarchicalMap.BasicHierarchicalMapCollection
Constructor Summary | |
BasicHierarchicalMap.BasicHierarchicalMapCollection(java.lang.Object[] key)
|
Method Summary | |
boolean |
add(java.lang.Object o)
Add an object to the collection (optional operation). |
boolean |
addAll(java.util.Collection c)
Add all the elements of a given collection to this collection (optional operation). |
void |
clear()
Remove all elements from the collection (optional operation). |
boolean |
contains(java.lang.Object o)
Test whether this collection contains a given object. |
boolean |
containsAll(java.util.Collection c)
Tests whether this collection contains all the elements in a given collection. |
HierarchicalMap |
getContainer()
|
java.lang.Object |
getKey()
|
boolean |
isEmpty()
Test whether this collection is empty. |
java.util.Iterator |
iterator()
Return an Iterator over this collection. |
boolean |
remove(java.lang.Object o)
Remove a single instance of an object from this collection (optional operation). |
boolean |
removeAll(java.util.Collection c)
Remove from this collection all its elements that are contained in a given collection (optional operation). |
boolean |
retainAll(java.util.Collection c)
Remove from this collection all its elements that are not contained in a given collection (optional operation). |
int |
size()
Return the number of elements in this collection. |
java.lang.Object[] |
toArray()
Return an array containing the elements of this collection. |
java.lang.Object[] |
toArray(java.lang.Object[] a)
Copy the collection into a given array if it will fit, or into a dynamically created array of the same run-time type as the given array if not. |
java.lang.String |
toString()
Creates a String representation of the Collection. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.util.Collection |
equals, hashCode |
Constructor Detail |
public BasicHierarchicalMap.BasicHierarchicalMapCollection(java.lang.Object[] key)
Method Detail |
public java.util.Iterator iterator()
org.dhmp.util.AbstractCollection
public int size()
org.dhmp.util.AbstractCollection
public java.lang.Object getKey()
public HierarchicalMap getContainer()
public boolean add(java.lang.Object o)
add
in interface java.util.Collection
o
- the object to add
java.lang.UnsupportedOperationException
- if the add operation is not
supported on this collection
java.lang.NullPointerException
- if the collection does not support null
java.lang.ClassCastException
- if the object is of the wrong type
java.lang.IllegalArgumentException
- if some aspect of the object prevents
it from being addedpublic boolean addAll(java.util.Collection c)
addAll
in interface java.util.Collection
c
- the collection to add the elements of to this collection
java.lang.UnsupportedOperationException
- if the add operation is not
supported on this collection
java.lang.NullPointerException
- if the specified collection is null
java.lang.ClassCastException
- if the type of any element in c is
not a valid type for addition.
java.lang.IllegalArgumentException
- if some aspect of any element
in c prevents it being added.
java.lang.NullPointerException
- if any element in c is null and this
collection doesn't allow null values.AbstractCollection.add(Object)
public void clear()
clear
in interface java.util.Collection
java.lang.UnsupportedOperationException
- if the Iterator returned by
iterator does not provide an implementation of removeIterator.remove()
public boolean contains(java.lang.Object o)
contains
in interface java.util.Collection
o
- the object to remove from this collection
public boolean containsAll(java.util.Collection c)
containsAll
in interface java.util.Collection
c
- the collection to test against
java.lang.NullPointerException
- if the given collection is nullAbstractCollection.contains(Object)
public boolean isEmpty()
isEmpty
in interface java.util.Collection
AbstractCollection.size()
public boolean remove(java.lang.Object o)
(o == null ? e == null : o.equals(e))
, if such an element
exists. This implementation obtains an iterator over the collection
and iterates over it, testing each element for equality with the given
object. If it is equal, it is removed by the iterator's remove method
(thus this method will fail with an UnsupportedOperationException if
the Iterator's remove method does). After the first element has been
removed, true is returned; if the end of the collection is reached, false
is returned.
remove
in interface java.util.Collection
o
- the object to remove from this collection
java.lang.UnsupportedOperationException
- if this collection's Iterator
does not support the remove methodIterator.remove()
public boolean removeAll(java.util.Collection c)
removeAll
in interface java.util.Collection
c
- the collection to remove the elements of
java.lang.UnsupportedOperationException
- if this collection's Iterator
does not support the remove method
java.lang.NullPointerException
- if the collection, c, is null.Iterator.remove()
public boolean retainAll(java.util.Collection c)
retainAll
in interface java.util.Collection
c
- the collection to retain the elements of
java.lang.UnsupportedOperationException
- if this collection's Iterator
does not support the remove method
java.lang.NullPointerException
- if the collection, c, is null.Iterator.remove()
public java.lang.Object[] toArray()
toArray
in interface java.util.Collection
public java.lang.Object[] toArray(java.lang.Object[] a)
toArray
in interface java.util.Collection
a
- the array to copy into, or of the correct run-time type
java.lang.NullPointerException
- if the given array is null
java.lang.ArrayStoreException
- if the type of the array precludes holding
one of the elements of the Collectionpublic java.lang.String toString()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |