ehcache

net.sf.ehcache.util
Class SetWrapperList

java.lang.Object
  extended by net.sf.ehcache.util.SetWrapperList
All Implemented Interfaces:
Iterable, Collection, List

public class SetWrapperList
extends Object
implements List

Wraps a set to provide a list interface. All list methods not application to set throws an UnsupportedOperationException

Author:
Nabib El-Rahman

Constructor Summary
SetWrapperList(Collection aDelegate)
          Collection to delegate to.
 
Method Summary
 void add(int index, Object entry)
          Does not support List methods UnsupportedOperationException.
 boolean add(Object obj)
          
 boolean addAll(Collection coll)
          
 boolean addAll(int index, Collection coll)
          Does not support List methods UnsupportedOperationException.
 void clear()
          
 boolean contains(Object obj)
          
 boolean containsAll(Collection coll)
          
 Object get(int index)
          Does not support List methods UnsupportedOperationException.
 int indexOf(Object object)
          Does not support List methods UnsupportedOperationException.
 boolean isEmpty()
          
 Iterator iterator()
          
 int lastIndexOf(Object object)
          Does not support List methods UnsupportedOperationException.
 ListIterator listIterator()
          Does not support List methods UnsupportedOperationException.
 ListIterator listIterator(int index)
          Does not support List methods UnsupportedOperationException.
 Object remove(int index)
          Does not support List methods UnsupportedOperationException.
 boolean remove(Object obj)
          
 boolean removeAll(Collection coll)
          
 boolean retainAll(Collection coll)
          
 Object set(int index, Object object)
          Does not support List methods UnsupportedOperationException.
 int size()
          
 List subList(int start, int offset)
          Does not support List methods UnsupportedOperationException.
 Object[] toArray()
          
 Object[] toArray(Object[] arr)
          
 
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

SetWrapperList

public SetWrapperList(Collection aDelegate)
Collection to delegate to.

Parameters:
aDelegate - delegate
Method Detail

add

public final boolean add(Object obj)

Specified by:
add in interface Collection
Specified by:
add in interface List

add

public final void add(int index,
                      Object entry)
Does not support List methods UnsupportedOperationException.

Specified by:
add in interface List
Parameters:
index - Index
entry - Entry

addAll

public final boolean addAll(Collection coll)

Specified by:
addAll in interface Collection
Specified by:
addAll in interface List

addAll

public final boolean addAll(int index,
                            Collection coll)
Does not support List methods UnsupportedOperationException.

Specified by:
addAll in interface List
Parameters:
index - Index
coll - Collection
Returns:
boolean

clear

public final void clear()

Specified by:
clear in interface Collection
Specified by:
clear in interface List

contains

public final boolean contains(Object obj)

Specified by:
contains in interface Collection
Specified by:
contains in interface List

containsAll

public final boolean containsAll(Collection coll)

Specified by:
containsAll in interface Collection
Specified by:
containsAll in interface List

get

public final Object get(int index)
Does not support List methods UnsupportedOperationException.

Specified by:
get in interface List
Parameters:
index - Index
Returns:
Object

indexOf

public final int indexOf(Object object)
Does not support List methods UnsupportedOperationException.

Specified by:
indexOf in interface List
Parameters:
object - Object
Returns:
integer

isEmpty

public final boolean isEmpty()

Specified by:
isEmpty in interface Collection
Specified by:
isEmpty in interface List

iterator

public final Iterator iterator()

Specified by:
iterator in interface Iterable
Specified by:
iterator in interface Collection
Specified by:
iterator in interface List

lastIndexOf

public final int lastIndexOf(Object object)
Does not support List methods UnsupportedOperationException.

Specified by:
lastIndexOf in interface List
Parameters:
object - Object
Returns:
integer

listIterator

public final ListIterator listIterator()
Does not support List methods UnsupportedOperationException.

Specified by:
listIterator in interface List
Returns:
ListIterator

listIterator

public final ListIterator listIterator(int index)
Does not support List methods UnsupportedOperationException.

Specified by:
listIterator in interface List
Parameters:
index - Index
Returns:
ListIterator

remove

public final boolean remove(Object obj)

Specified by:
remove in interface Collection
Specified by:
remove in interface List

remove

public final Object remove(int index)
Does not support List methods UnsupportedOperationException.

Specified by:
remove in interface List
Parameters:
index - Index
Returns:
Object

removeAll

public final boolean removeAll(Collection coll)

Specified by:
removeAll in interface Collection
Specified by:
removeAll in interface List

retainAll

public final boolean retainAll(Collection coll)

Specified by:
retainAll in interface Collection
Specified by:
retainAll in interface List

set

public final Object set(int index,
                        Object object)
Does not support List methods UnsupportedOperationException.

Specified by:
set in interface List
Parameters:
index - Index
object - Object
Returns:
Object

size

public final int size()

Specified by:
size in interface Collection
Specified by:
size in interface List

subList

public final List subList(int start,
                          int offset)
Does not support List methods UnsupportedOperationException.

Specified by:
subList in interface List
Parameters:
start - Start
offset - Offset
Returns:
List

toArray

public final Object[] toArray()

Specified by:
toArray in interface Collection
Specified by:
toArray in interface List

toArray

public final Object[] toArray(Object[] arr)

Specified by:
toArray in interface Collection
Specified by:
toArray in interface List

ehcache

true