Class CheckedMultimap_RD<D,R>

All Implemented Interfaces:
Multimap<D,R>, Multimap_checkedLeft<D,R>, Multimap_checkedRight<D,R>, Serializable, Iterable<Map.Entry<D,R>>, Collection<Map.Entry<D,R>>, BiPredicate<D,R>, Set<Map.Entry<D,R>>

public class CheckedMultimap_RD<D,R> extends HashMultimap<D,R> implements Multimap_checkedLeft<D,R>, Multimap_checkedRight<D,R>
Implements a multi map which is strict in its domain and its range, i.e. both sides of the "arrow". The implementation is done extending the bandm.metatools runtime class HashMultimap.
This implementation uses HASH-maps for both sides. There are other implementations possible, using diffent kinds of maps as underlying storage, but these are not yet connected to the umod code generation.
See MapMultimap.
For each of the three checked classes ("RD"/"R"/"D") strictness is only implemented explcitly in two methods. It is guaranteed by the classes from "ops", that there is no bypass:
    


    ops
        MapMultimap
                       constructor()       add(Map.Entry) - X -> add(D,R)
                           ^                           |        ^ 
    ops                    |                           |        |
        HashMultimap       |                           |        |
                    constructor(Collection<Map.Entry>) |        |
                           ^                           |        |
    umod/runtime           |                           |        |
        CheckedMultimap_X  |                           V        |
                       constructor(Multimap){        add(D,R){ 
                         check data}                    check data}

    
    
    java.util
       AbstractCollection
                       addAll() 
    ops                    ^        \
        AbstractMultimap   |[add()]  \ 
    ops                    |          \
        MapMultimap        |           \
                           |              add(Map.Entry)     
                           |
    ops                    |
        HashMultimap       |                            ??????????
                       constructor(coll<Map.Entry>)  constructor(HashMultimap)
                           ^
                       constructor(Map)                           
    umod/runtime                        
        CheckedMultimap_X              

    
See Also:
  • Constructor Details

    • CheckedMultimap_RD

      public CheckedMultimap_RD()
    • CheckedMultimap_RD

      public CheckedMultimap_RD(Multimap<D,R> data)
  • Method Details

    • add

      public boolean add(D key, R value)
      Description copied from interface: Multimap
      Adds a pair to this multimap. This operation must be stable: adding a pair that equals any pair contained in this multimap componentwise must not change this multimap.
      Specified by:
      add in interface Multimap<D,R>
      Overrides:
      add in class MapMultimap<D,R>
      Parameters:
      key - the left component of the pair to add.
      value - the right component of the pair to add.
      Returns:
      true if this multimap has been changed by this operation, false otherwise.