public abstract class IDataElementCollection
extends java.lang.Object
implements java.util.Collection
com.wm.data.IData
instance in a
java.util.Collection
implementation.IData
,
IDataCursor
,
Collection
,
Iterator
Modifier and Type | Field and Description |
---|---|
protected com.wm.data.IDataCursor |
elementCursor
Cursor object to the underlying IData object.
|
protected com.wm.data.IData |
iData
Underlying IData object containing the elements.
|
Constructor and Description |
---|
IDataElementCollection(com.wm.data.IData iData)
Constructs an
IDataElementCollection . |
Modifier and Type | Method and Description |
---|---|
boolean |
add(java.lang.Object o)
Adds the specified element to this set if it is not already present.
|
boolean |
addAll(java.util.Collection c)
Adds all of the elements in the specified collection to this set if they're not already present.
|
void |
clear()
Removes all of the elements from this set.
|
abstract boolean |
contains(java.lang.Object o)
Returns
true if this collection contains the specified
element. |
abstract boolean |
containsAll(java.util.Collection collection)
Returns
true if this collection contains all of the elements
in the specified collection. |
void |
finalize()
Cleans up the underlying
IDataCursor and IData
instances. |
boolean |
isEmpty()
Returns
true if this collection contains no elements. |
abstract java.util.Iterator |
iterator()
Returns an iterator over the elements in this collection.
|
abstract boolean |
remove(java.lang.Object o)
Removes the specified element from this set if it is present.
|
boolean |
removeAll(java.util.Collection c)
Removes from this set all of the elements that are also contained in the
specified collection.
|
abstract boolean |
retainAll(java.util.Collection c)
Retains only the elements in this set that are contained in the specified collection.
|
int |
size()
Returns the number of elements contained in the underlying
IData object. |
abstract java.lang.Object[] |
toArray()
Returns an array containing all of the elements in the underlying
IData object. |
java.lang.Object[] |
toArray(java.lang.Object[] a)
Returns an array containing all of the elements in the underlying
IData object. |
java.util.Vector |
toVector()
Returns the elements in the underlying
IData object as a vector. |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
protected com.wm.data.IDataCursor elementCursor
protected com.wm.data.IData iData
public IDataElementCollection(com.wm.data.IData iData)
IDataElementCollection
.iData
- The underlying IData instance.public boolean add(java.lang.Object o)
IDataElementCollection
.add
in interface java.util.Collection
o
- Object to add.true
if the object was addedUnsupportedOperationException.
- This exception is always thrown.public boolean addAll(java.util.Collection c)
IDataElementCollection
.addAll
in interface java.util.Collection
c
- Collection containing all objects to addtrue
if all objects were addedUnsupportedOperationException.
- This exception is always thrown.public void clear()
clear
in interface java.util.Collection
public abstract boolean contains(java.lang.Object o)
true
if this collection contains the specified
element. More formally, returns true if and only if this
collection contains at least one element e such that
(o==null ? e==null : o.equals(e)).contains
in interface java.util.Collection
o
- element whose presence in this collection is to be tested.true
if this collection contains the specified elementpublic abstract boolean containsAll(java.util.Collection collection)
true
if this collection contains all of the elements
in the specified collection.containsAll
in interface java.util.Collection
collection
- collection to be checked for containment in this collection.true
if this collection contains all of the elements
in the specified collectioncontains(Object)
public void finalize()
IDataCursor
and IData
instances.finalize
in class java.lang.Object
public boolean isEmpty()
true
if this collection contains no elements.isEmpty
in interface java.util.Collection
true
if this collection contains no elementspublic abstract java.util.Iterator iterator()
iterator
in interface java.lang.Iterable
iterator
in interface java.util.Collection
IDataElementIterator
over the elements in this collectionpublic abstract boolean remove(java.lang.Object o)
remove
in interface java.util.Collection
o
- Object to remove.public boolean removeAll(java.util.Collection c)
removeAll
in interface java.util.Collection
c
- Collection containing all objects that should be removed.true
if all objects were removed.public abstract boolean retainAll(java.util.Collection c)
retainAll
in interface java.util.Collection
c
- Collection containing all objects to retain.true
if more than one object was removed.public int size()
IData
object.
Note: Because this method must iterate through all of the elements in this collection to fulfill its purpose, you should consider the potential overhead involved in such an operation, especially when dealing with large collections.
size
in interface java.util.Collection
public abstract java.lang.Object[] toArray()
IData
object.toArray
in interface java.util.Collection
public java.lang.Object[] toArray(java.lang.Object[] a)
IData
object.
This method is provided solely to satisfy the java.util.Collection
interface contract. It simply ignores its input parameter and defers to the child's
implementation of toArray()
.toArray
in interface java.util.Collection
a
- the array into which the elements of this collection are to be
stored, if it is big enough; otherwise, a new array of the same
run time type is allocated for this purpose.public java.util.Vector toVector()
IData
object as a vector.
Copyright © 2003 - 2021 Software AG, Darmstadt, Germany and/or Software AG USA Inc., Reston, VA, USA, and/or its subsidiaries and/or its affiliates and/or their licensors.