org.sourceforge.jemm.collections
Class JemmList<K>

java.lang.Object
  extended by org.sourceforge.jemm.util.JEMMType
      extended by org.sourceforge.jemm.collections.JemmList<K>
Type Parameters:
K - The type stored in the list.
All Implemented Interfaces:
java.lang.Iterable<K>, java.util.Collection<K>, java.util.List<K>, JEMMObject

public final class JemmList<K>
extends JEMMType
implements java.util.List<K>

Jemm List implementation.

Author:
Rory Graves

Field Summary
 
Fields inherited from class org.sourceforge.jemm.util.JEMMType
jemmOIF
 
Constructor Summary
  JemmList()
          Creates a new empty JemmList.
protected JemmList(ShadowTypeObject jemmOIF)
          Internally JEMM used constructor
 
Method Summary
 void add(int index, K uValue)
           
 boolean add(K uValue)
           
 boolean addAll(java.util.Collection<? extends K> c)
           
 boolean addAll(int index, java.util.Collection<? extends K> c)
           
 void clear()
           
 boolean contains(java.lang.Object value)
           
 boolean containsAll(java.util.Collection<?> c)
           
 K get(int index)
           
 int indexOf(java.lang.Object value)
           
 boolean isEmpty()
           
 java.util.Iterator<K> iterator()
           
 int lastIndexOf(java.lang.Object uValue)
           
 java.util.ListIterator<K> listIterator()
           
 java.util.ListIterator<K> listIterator(int index)
           
 K remove(int index)
           
 boolean remove(java.lang.Object uValue)
           
 boolean removeAll(java.util.Collection<?> uCollection)
           
 boolean retainAll(java.util.Collection<?> uCollection)
           
 K set(int index, K uValue)
           
 int size()
           
 java.util.List<K> subList(int fromIndex, int toIndex)
           
 java.lang.Object[] toArray()
           
<T> T[]
toArray(T[] a)
           
 
Methods inherited from class org.sourceforge.jemm.util.JEMMType
setShadow
 
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

JemmList

public JemmList()
Creates a new empty JemmList.


JemmList

protected JemmList(ShadowTypeObject jemmOIF)
Internally JEMM used constructor

Parameters:
jemmOIF - The underlying shadow object
Method Detail

add

public boolean add(K uValue)
Specified by:
add in interface java.util.Collection<K>
Specified by:
add in interface java.util.List<K>

add

public void add(int index,
                K uValue)
Specified by:
add in interface java.util.List<K>

addAll

public boolean addAll(java.util.Collection<? extends K> c)
Specified by:
addAll in interface java.util.Collection<K>
Specified by:
addAll in interface java.util.List<K>

addAll

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

clear

public void clear()
Specified by:
clear in interface java.util.Collection<K>
Specified by:
clear in interface java.util.List<K>

contains

public boolean contains(java.lang.Object value)
Specified by:
contains in interface java.util.Collection<K>
Specified by:
contains in interface java.util.List<K>

containsAll

public boolean containsAll(java.util.Collection<?> c)
Specified by:
containsAll in interface java.util.Collection<K>
Specified by:
containsAll in interface java.util.List<K>

get

public K get(int index)
Specified by:
get in interface java.util.List<K>

indexOf

public int indexOf(java.lang.Object value)
Specified by:
indexOf in interface java.util.List<K>

isEmpty

public boolean isEmpty()
Specified by:
isEmpty in interface java.util.Collection<K>
Specified by:
isEmpty in interface java.util.List<K>

iterator

public java.util.Iterator<K> iterator()
Specified by:
iterator in interface java.lang.Iterable<K>
Specified by:
iterator in interface java.util.Collection<K>
Specified by:
iterator in interface java.util.List<K>

lastIndexOf

public int lastIndexOf(java.lang.Object uValue)
Specified by:
lastIndexOf in interface java.util.List<K>

listIterator

public java.util.ListIterator<K> listIterator()
Specified by:
listIterator in interface java.util.List<K>

listIterator

public java.util.ListIterator<K> listIterator(int index)
Specified by:
listIterator in interface java.util.List<K>

remove

public boolean remove(java.lang.Object uValue)
Specified by:
remove in interface java.util.Collection<K>
Specified by:
remove in interface java.util.List<K>

remove

public K remove(int index)
Specified by:
remove in interface java.util.List<K>

removeAll

public boolean removeAll(java.util.Collection<?> uCollection)
Specified by:
removeAll in interface java.util.Collection<K>
Specified by:
removeAll in interface java.util.List<K>

retainAll

public boolean retainAll(java.util.Collection<?> uCollection)
Specified by:
retainAll in interface java.util.Collection<K>
Specified by:
retainAll in interface java.util.List<K>

set

public K set(int index,
             K uValue)
Specified by:
set in interface java.util.List<K>

size

public int size()
Specified by:
size in interface java.util.Collection<K>
Specified by:
size in interface java.util.List<K>

subList

public java.util.List<K> subList(int fromIndex,
                                 int toIndex)
Specified by:
subList in interface java.util.List<K>

toArray

public java.lang.Object[] toArray()
Specified by:
toArray in interface java.util.Collection<K>
Specified by:
toArray in interface java.util.List<K>

toArray

public <T> T[] toArray(T[] a)
Specified by:
toArray in interface java.util.Collection<K>
Specified by:
toArray in interface java.util.List<K>


Copyright © 2009. All Rights Reserved.