org.ujmp.core.collections
Class MapToListWrapper<A>

java.lang.Object
  extended by org.ujmp.core.collections.MapToListWrapper<A>
All Implemented Interfaces:
Iterable<A>, Collection<A>, List<A>, Wrapper<Map<Integer,A>>

public class MapToListWrapper<A>
extends Object
implements Wrapper<Map<Integer,A>>, List<A>


Constructor Summary
MapToListWrapper(Map<Integer,A> map)
           
 
Method Summary
 boolean add(A e)
           
 void add(int index, A element)
           
 boolean addAll(Collection<? extends A> c)
           
 boolean addAll(int index, Collection<? extends A> c)
           
 void clear()
           
 boolean contains(Object o)
           
 boolean containsAll(Collection<?> c)
           
 A get(int index)
           
 Map<Integer,A> getWrappedObject()
          Returns the object that is wrapped inside the wrapper
 int indexOf(Object o)
           
 boolean isEmpty()
           
 Iterator<A> iterator()
           
 int lastIndexOf(Object o)
           
 ListIterator<A> listIterator()
           
 ListIterator<A> listIterator(int index)
           
 A remove(int index)
           
 boolean remove(Object o)
           
 boolean removeAll(Collection<?> c)
           
 boolean retainAll(Collection<?> c)
           
 A set(int index, A element)
           
 void setWrappedObject(Map<Integer,A> object)
          Sets the object that is wrapped inside the wrapper
 int size()
           
 List<A> subList(int fromIndex, int toIndex)
           
 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.List
equals, hashCode
 

Constructor Detail

MapToListWrapper

public MapToListWrapper(Map<Integer,A> map)
Method Detail

add

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

add

public void add(int index,
                A element)
Specified by:
add in interface List<A>

addAll

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

addAll

public boolean addAll(int index,
                      Collection<? extends A> c)
Specified by:
addAll in interface List<A>

clear

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

contains

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

containsAll

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

get

public A get(int index)
Specified by:
get in interface List<A>

indexOf

public int indexOf(Object o)
Specified by:
indexOf in interface List<A>

isEmpty

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

iterator

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

lastIndexOf

public int lastIndexOf(Object o)
Specified by:
lastIndexOf in interface List<A>

listIterator

public ListIterator<A> listIterator()
Specified by:
listIterator in interface List<A>

listIterator

public ListIterator<A> listIterator(int index)
Specified by:
listIterator in interface List<A>

remove

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

remove

public A remove(int index)
Specified by:
remove in interface List<A>

removeAll

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

retainAll

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

set

public A set(int index,
             A element)
Specified by:
set in interface List<A>

size

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

subList

public List<A> subList(int fromIndex,
                       int toIndex)
Specified by:
subList in interface List<A>

toArray

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

toArray

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

getWrappedObject

public Map<Integer,A> getWrappedObject()
Description copied from interface: Wrapper
Returns the object that is wrapped inside the wrapper

Specified by:
getWrappedObject in interface Wrapper<Map<Integer,A>>
Returns:
the inner object

setWrappedObject

public void setWrappedObject(Map<Integer,A> object)
Description copied from interface: Wrapper
Sets the object that is wrapped inside the wrapper

Specified by:
setWrappedObject in interface Wrapper<Map<Integer,A>>
Parameters:
object - new objects to wrap


Copyright © 2010. All Rights Reserved.