T1 - object object specifying key at the time of instantiation of this interfaceT2 - object object specifying value at the time of instantiation of this interfacepublic class MultiValuedPairedCollection<T1,T2> extends java.lang.Object implements IMultiValuedPairedCollection<T1,T2>
| Modifier and Type | Class and Description |
|---|---|
class |
MultiValuedPairedCollection.CollectionIterator
This inner class works as an Iterator which helps iterating over the map contained in Message or Group
This iterator enables you to traverse through a collection
This class is implemented such that the programmer can have any
object stored in it he/she wants and having ITag as its key.
|
class |
MultiValuedPairedCollection.SortedIterator
This inner class works as an Sorted Iterator which helps iterating over the map contained in Message or Group
This iterator can be used for the purpose of getting all the elements of the DataSet one by one as it iterates elements
in Sorted order.
|
| Constructor and Description |
|---|
MultiValuedPairedCollection()
Constructs a new MultiValuedPairedCollection with the same mappings as the specified Collection.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
contains(T1 objT1)
Returns the status indicating whether the key is present in the collection or not
|
ISingleCollection<T2> |
get(T1 objT1)
Provides key based accessing over the internal collection
|
ISingleCollection<T2> |
getAllValues()
Retrieves All values present in the collection
|
ICollectionIterator<T2> |
iterator()
Returns an iterator over the internal collection.
|
void |
put(T1 objT1,
ISingleCollection<T2> objT2)
Provides a mechanism for adding a key value pair to the collection
|
void |
put(T1 objT1,
T2 objT2)
Provides a mechanism for adding a key value pair to the collection
|
void |
remove(T1 objT1)
Provides a mechanism for removing a key value pair to the collection
|
void |
remove(T1 objT1,
T2 objT2)
Provides a removes a specified value present for specified key and removes key too if no
values present for that key.
|
int |
size()
Returns the size of the collection
|
ICollectionIterator<T2> |
sortedIterator()
Returns an iterator over the internal collection.
|
public MultiValuedPairedCollection()
public ICollectionIterator<T2> iterator()
iterator in interface ICollectionIterable<T2>iterator in interface java.lang.Iterable<T2>public ICollectionIterator<T2> sortedIterator()
public ISingleCollection<T2> get(T1 objT1)
get in interface IMultiValuedPairedCollection<T1,T2>objT1 - This parameter specifies the key whose corresponding value is to be retrievedpublic ISingleCollection<T2> getAllValues()
getAllValues in interface IMultiValuedPairedCollection<T1,T2>public void put(T1 objT1, T2 objT2)
put in interface IMultiValuedPairedCollection<T1,T2>objT1 - This parameter specifies the key.objT2 - This parameter specifies the value.public void remove(T1 objT1)
remove in interface IMultiValuedPairedCollection<T1,T2>objT1 - This parameter specifies the key whose corresponding value to removepublic void remove(T1 objT1, T2 objT2)
remove in interface IMultiValuedPairedCollection<T1,T2>objT1 - This parameter specifies the key whose corresponding value to removeobjT2 - object specifying the value corresponding to the key in
the specified collectionpublic void put(T1 objT1, ISingleCollection<T2> objT2)
put in interface IMultiValuedPairedCollection<T1,T2>objT1 - This parameter specifies the key.objT2 - This parameter specifies the value.public boolean contains(T1 objT1)
contains in interface IMultiValuedPairedCollection<T1,T2>objT1 - element whose presence in this collection is to be testedpublic int size()