T1 - object object specifying key at the time of instantiation of this interface.T2 - object object specifying value at the time of instantiation of this interface.public class PairedCollection<T1,T2> extends java.lang.Object implements IPairedCollection<T1,T2>
| Modifier and Type | Class and Description |
|---|---|
class |
PairedCollection.CollectionIterator
This inner class works as an Iterator which helps iterating over the map contained in the DataSet.
|
class |
PairedCollection.SortedIterator
This inner class works as an Sorted Iterator which helps iterating over the map contained in the DataSet.
|
| Constructor and Description |
|---|
PairedCollection()
Constructs a new PairedCollection with the same mappings as the specified Collection.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
contains(T1 objT1)
This method returns the status indicating whether the key is present in the collection or not
|
T2 |
get(T1 objT1)
This method provides key based accessing over the internal collection.
|
T1[] |
getKeys()
The implementation of this method gets all the keys in the collection.
|
ICollectionIterator<T2> |
iterator()
This method returns an iterator over the internal collection.
|
void |
put(T1 objT1,
T2 objT2)
This method provides a mechanism for adding a key value pair to the collection.
|
T2 |
remove(T1 objT1)
Removes the values associated with the given key.
|
int |
size()
This method returns the size of the collection.
|
ICollectionIterator<T2> |
sortedIterator()
This method returns an iterator over the internal collection.
|
public PairedCollection()
public ICollectionIterator<T2> iterator()
iterator in interface ICollectionIterable<T2>iterator in interface java.lang.Iterable<T2>public ICollectionIterator<T2> sortedIterator()
sortedIterator in interface IPairedCollection<T1,T2>public T2 get(T1 objT1)
get in interface IPairedCollection<T1,T2>objT1 - This parameter specifies the key whose corresponding value is to be retrieved .public void put(T1 objT1, T2 objT2)
put in interface IPairedCollection<T1,T2>objT1 - This parameter specifies the key whose corresponding value is to be set.objT2 - This parameter specifies the key whose corresponding value is to be set.public boolean contains(T1 objT1)
contains in interface IPairedCollection<T1,T2>objT1 - element whose presence in this collection is to be tested .public int size()
size in interface IPairedCollection<T1,T2>public T2 remove(T1 objT1)
remove in interface IPairedCollection<T1,T2>objT1 - - key whose mapping value is removed.public T1[] getKeys()
getKeys in interface IPairedCollection<T1,T2>