public class RecordEntrySet extends IDataElementSet
Set
"-based API for accessing field/value entries
in a WmRecord
, which is created and returned by
WmRecord.entrySet()
and should not be explicitly
created by adapter writers. The items in RecordEntrySet
are instances of RecordEntry
.
RecordEntrySet
supports element removal, using the
Set.clear()
, Set.remove(java.lang.Object)
,
and Iterator.remove()
methods. These methods will remove the
RecordEntry from this Set
and remove the key/value pairs from its
corresponding WmRecord
.
RecordEntrySet
does not support the
Set.add(E)
,
Set.addAll(java.util.Collection<? extends E>)
,
Set.retainAll(java.util.Collection<?>)
methods. All other methods from Set
are supported.
WmRecord.entrySet()
,
RecordEntry
elementCursor, iData
Constructor and Description |
---|
RecordEntrySet(com.wm.data.IData iData)
Constructs a
RecordEntrySet . |
Modifier and Type | Method and Description |
---|---|
boolean |
contains(java.lang.Object recordEntry)
Returns
true if this Set contains the specified
RecordEntry item. |
boolean |
containsAll(java.util.Collection collection)
Returns
true if this Set contains all key/value
pairs specified in the collection of RecordEntry objects. |
java.util.Iterator |
iterator()
Returns an
Iterator object for the RecordEntry
elements in this Set . |
boolean |
remove(java.lang.Object recordEntry)
Removes the
RecordEntry item from this Set ,
and removes the associated key/value from its corresponding WmRecord . |
boolean |
retainAll(java.util.Collection c)
Retains only the elements in this set that are contained in the specified collection
(optional operation).
|
java.lang.Object[] |
toArray()
Returns an array containing all of the keys in the underlying
IData
object. |
add, addAll, clear, finalize, isEmpty, removeAll, size, toArray, toVector
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public RecordEntrySet(com.wm.data.IData iData)
RecordEntrySet
.iData
- IData object to get the keys of.public boolean contains(java.lang.Object recordEntry)
true
if this Set
contains the specified
RecordEntry
item.
Note: Because this method must iterate through all of the elements in this set to fulfill its purpose, you should consider the potential overhead involved in such an operation, especially when dealing with large sets.
contains
in interface java.util.Collection
contains
in interface java.util.Set
contains
in class IDataElementCollection
recordEntry
- a RecordEntry
object.true
if this Set
(and its corresponding
WmRecord
) contains the key/value. Returns false
if the input is not a RecordEntry
object or the corresponding
key/value is not found.public boolean containsAll(java.util.Collection collection)
true
if this Set
contains all key/value
pairs specified in the collection of RecordEntry
objects.
Note: Because this method must iterate through all of the elements in this set to fulfill its purpose, you should consider the potential overhead involved in such an operation, especially when dealing with large sets.
containsAll
in interface java.util.Collection
containsAll
in interface java.util.Set
containsAll
in class IDataElementCollection
collection
- A Collection
of RecordEntry
objects.RecordEntry
objects in the
Collection
are contained in this Set
.IDataElementCollection.contains(Object)
public java.util.Iterator iterator()
Iterator
object for the RecordEntry
elements in this Set
.iterator
in interface java.lang.Iterable
iterator
in interface java.util.Collection
iterator
in interface java.util.Set
iterator
in class IDataElementCollection
RecordEntrySetIterator
RecordEntrySetIterator
public boolean remove(java.lang.Object recordEntry)
RecordEntry
item from this Set
,
and removes the associated key/value from its corresponding WmRecord
.
Note: If an adapter writer uses the IData
methods to add key/values into the
WmRecord
, it is possible for this record to have more than one key/value
pairs with the same key name. If this is the case, this method removes only the first
key/value in the Set
and record.
remove
in interface java.util.Collection
remove
in interface java.util.Set
remove
in class IDataElementCollection
recordEntry
- the RecordEntry object to remove from this Set.WmRecord
public boolean retainAll(java.util.Collection c)
String
elements.
For each key not specified in the collection, the record entry will be removed.
If a key not specified in the collection contains more than one entry, ALL the entries
will be removedretainAll
in interface java.util.Collection
retainAll
in interface java.util.Set
retainAll
in class IDataElementCollection
c
- Collection of String object representing the record keyspublic java.lang.Object[] toArray()
IData
object.toArray
in interface java.util.Collection
toArray
in interface java.util.Set
toArray
in class IDataElementCollection
Object[]
An array of strings, containing all the
underlying IData
keys
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.