FileDocCategorySizeDatePackage
DummyMap.javaAPI Docmp4parser 1.0-RC-171722Wed Dec 19 20:10:38 GMT 2012com.coremedia.iso.boxes.mdat

DummyMap

public class DummyMap extends Object implements Map
A SortedSet that contains just one value.

Fields Summary
HashSet
keys
V
value
Constructors Summary
public DummyMap(V value)


       
        this.value = value;
    
Methods Summary
public voidaddKeys(K[] keys)

        Collections.addAll(this.keys, keys);

    
public voidclear()

        keys.clear();
    
public java.util.Comparatorcomparator()

        return null;  // I don't have any
    
public booleancontainsKey(java.lang.Object key)

        return keys.contains(key);
    
public booleancontainsValue(java.lang.Object value)

        return this.value == value;
    
public java.util.SetentrySet()

        throw new UnsupportedOperationException();
    
public Vget(java.lang.Object key)

        return keys.contains(key) ? value : null;
    
public booleanisEmpty()

        return keys.isEmpty();
    
public java.util.SetkeySet()

        return keys;
    
public Vput(K key, V value)

        assert this.value == value;
        keys.add(key);
        return this.value;
    
public voidputAll(java.util.Map m)

        for (K k : m.keySet()) {
            assert m.get(k) == value;
            this.keys.add(k);
        }
    
public Vremove(java.lang.Object key)

        V v = get(key);
        keys.remove(key);
        return v;
    
public intsize()

        return keys.size();
    
public java.util.Collectionvalues()

        throw new UnsupportedOperationException();