jetbrains.buildServer.dataStructures
Class MultiMapDecorator<TK,TV,TC extends java.util.Collection<TV>>

java.lang.Object
  extended by jetbrains.buildServer.dataStructures.MultiMapDecorator<TK,TV,TC>
Direct Known Subclasses:
MultiMapToSet

public abstract class MultiMapDecorator<TK,TV,TC extends java.util.Collection<TV>>
extends java.lang.Object

Handy decoration that can be used to create multi map


Field Summary
protected  java.util.Map<TK,TC> myMap
           
 
Constructor Summary
MultiMapDecorator(java.util.Map<TK,TC> map)
           
 
Method Summary
 void add(TK key, TV value)
           
 void addAll(MultiMapDecorator<TK,TV,TC> map)
           
 void addAll(TK key, java.util.Collection<? extends TV> values)
           
 void addEmpty(TK key)
           
 void clear()
           
 boolean containsKey(TK key)
           
protected abstract  TC createEmptyCollection()
           
 java.util.Set<java.util.Map.Entry<TK,TC>> entrySet()
           
 java.util.Collection<TV> getValues(TK key)
           
 boolean isEmpty()
           
 java.util.Set<TK> keySet()
           
 void removeKey(TK key)
           
 void removeValue(TV v)
           
 int size()
           
 java.util.Collection<TC> values()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

myMap

protected final java.util.Map<TK,TC extends java.util.Collection<TV>> myMap
Constructor Detail

MultiMapDecorator

public MultiMapDecorator(java.util.Map<TK,TC> map)
Method Detail

add

public void add(TK key,
                TV value)

addEmpty

public void addEmpty(TK key)

getValues

@NotNull
public java.util.Collection<TV> getValues(TK key)

containsKey

public boolean containsKey(TK key)

clear

public void clear()

keySet

public java.util.Set<TK> keySet()

values

public java.util.Collection<TC> values()

entrySet

public java.util.Set<java.util.Map.Entry<TK,TC>> entrySet()

size

public int size()

isEmpty

public boolean isEmpty()

removeKey

public void removeKey(TK key)

removeValue

public void removeValue(TV v)

addAll

public void addAll(TK key,
                   java.util.Collection<? extends TV> values)

addAll

public void addAll(MultiMapDecorator<TK,TV,TC> map)

createEmptyCollection

protected abstract TC createEmptyCollection()