ua.gradsoft.javachecker.util
Class ImmutableMappedCollection<X,Y>
java.lang.Object
ua.gradsoft.javachecker.util.ImmutableMappedCollection<X,Y>
- All Implemented Interfaces:
- java.lang.Iterable<Y>, java.util.Collection<Y>
- Direct Known Subclasses:
- ImmutableMappedList
public class ImmutableMappedCollection<X,Y>
- extends java.lang.Object
- implements java.util.Collection<Y>
represent collection of X as collection of Y
- Author:
- rssh
| 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 |
origin_
protected java.util.Collection<X> origin_
f_
protected Function<X,Y> f_
ImmutableMappedCollection
public ImmutableMappedCollection(java.util.Collection<X> origin,
Function<X,Y> f)
- Creates a new instance of ImmutableMappedCollection
add
public boolean add(Y e)
- Specified by:
add in interface java.util.Collection<Y>
addAll
public boolean addAll(java.util.Collection<? extends Y> c)
- Specified by:
addAll in interface java.util.Collection<Y>
clear
public void clear()
- Specified by:
clear in interface java.util.Collection<Y>
contains
public boolean contains(java.lang.Object o)
- Specified by:
contains in interface java.util.Collection<Y>
containsAll
public boolean containsAll(java.util.Collection<?> c)
- Specified by:
containsAll in interface java.util.Collection<Y>
isEmpty
public boolean isEmpty()
- Specified by:
isEmpty in interface java.util.Collection<Y>
iterator
public java.util.Iterator<Y> iterator()
- Specified by:
iterator in interface java.lang.Iterable<Y>- Specified by:
iterator in interface java.util.Collection<Y>
remove
public boolean remove(java.lang.Object o)
- Specified by:
remove in interface java.util.Collection<Y>
removeAll
public boolean removeAll(java.util.Collection<?> c)
- Specified by:
removeAll in interface java.util.Collection<Y>
retainAll
public boolean retainAll(java.util.Collection<?> c)
- Specified by:
retainAll in interface java.util.Collection<Y>
size
public int size()
- Specified by:
size in interface java.util.Collection<Y>
toArray
public java.lang.Object[] toArray()
- Specified by:
toArray in interface java.util.Collection<Y>
toArray
public <T> T[] toArray(T[] x)
- Specified by:
toArray in interface java.util.Collection<Y>