cz.cuni.amis.utils.collections
Class LazyMapValuesCollection<VALUE,KEY>

Package class diagram package LazyMapValuesCollection
java.lang.Object
  extended by cz.cuni.amis.utils.collections.LazyMapValuesCollection<VALUE,KEY>
All Implemented Interfaces:
Iterable<VALUE>, Collection<VALUE>

public class LazyMapValuesCollection<VALUE,KEY>
extends Object
implements Collection<VALUE>

Read-only Collection used for lazy implementation of Map.values(). The items in this collection are backed by the map and Map.get() is used if an object is required.

Author:
srlok

Constructor Summary
LazyMapValuesCollection(AbstractLazyMap<KEY,VALUE> sourceMap)
           
 
Method Summary
 boolean add(VALUE e)
           
 boolean addAll(Collection<? extends VALUE> c)
           
 void clear()
           
 boolean contains(Object o)
           
 boolean containsAll(Collection<?> c)
           
 AbstractLazyMap<KEY,VALUE> getBaseMap()
           
 boolean isEmpty()
           
 Iterator<VALUE> iterator()
           
 boolean remove(Object o)
           
 boolean removeAll(Collection<?> c)
           
 boolean retainAll(Collection<?> c)
           
 int size()
           
 Object[] toArray()
           
<T> T[]
toArray(T[] a)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.Collection
equals, hashCode
 

Constructor Detail

LazyMapValuesCollection

public LazyMapValuesCollection(AbstractLazyMap<KEY,VALUE> sourceMap)
Method Detail

getBaseMap

public AbstractLazyMap<KEY,VALUE> getBaseMap()

add

public boolean add(VALUE e)
Specified by:
add in interface Collection<VALUE>

addAll

public boolean addAll(Collection<? extends VALUE> c)
Specified by:
addAll in interface Collection<VALUE>

clear

public void clear()
Specified by:
clear in interface Collection<VALUE>

contains

public boolean contains(Object o)
Specified by:
contains in interface Collection<VALUE>

containsAll

public boolean containsAll(Collection<?> c)
Specified by:
containsAll in interface Collection<VALUE>

isEmpty

public boolean isEmpty()
Specified by:
isEmpty in interface Collection<VALUE>

iterator

public Iterator<VALUE> iterator()
Specified by:
iterator in interface Iterable<VALUE>
Specified by:
iterator in interface Collection<VALUE>

remove

public boolean remove(Object o)
Specified by:
remove in interface Collection<VALUE>

removeAll

public boolean removeAll(Collection<?> c)
Specified by:
removeAll in interface Collection<VALUE>

retainAll

public boolean retainAll(Collection<?> c)
Specified by:
retainAll in interface Collection<VALUE>

size

public int size()
Specified by:
size in interface Collection<VALUE>

toArray

public Object[] toArray()
Specified by:
toArray in interface Collection<VALUE>

toArray

public <T> T[] toArray(T[] a)
Specified by:
toArray in interface Collection<VALUE>


Copyright © 2013 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.