Package net.sf.ehcache.util
Class SetAsList<E>
- java.lang.Object
-
- net.sf.ehcache.util.SetAsList<E>
-
- Type Parameters:
E-
- All Implemented Interfaces:
java.lang.Iterable<E>,java.util.Collection<E>,java.util.List<E>
public class SetAsList<E> extends java.lang.Object implements java.util.List<E>Wraps a set to provide a list interface. All list methods not application to set throws anUnsupportedOperationException- Author:
- Chris Dennis
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(int index, E element)Does not support List methodsUnsupportedOperationException.booleanadd(E e)booleanaddAll(int index, java.util.Collection<? extends E> c)Does not support List methodsUnsupportedOperationException.booleanaddAll(java.util.Collection<? extends E> c)voidclear()booleancontains(java.lang.Object o)booleancontainsAll(java.util.Collection<?> c)Eget(int index)Does not support List methodsUnsupportedOperationException.intindexOf(java.lang.Object o)Does not support List methodsUnsupportedOperationException.booleanisEmpty()java.util.Iterator<E>iterator()intlastIndexOf(java.lang.Object o)Does not support List methodsUnsupportedOperationException.java.util.ListIterator<E>listIterator()Does not support List methodsUnsupportedOperationException.java.util.ListIterator<E>listIterator(int index)Does not support List methodsUnsupportedOperationException.Eremove(int index)Does not support List methodsUnsupportedOperationException.booleanremove(java.lang.Object o)booleanremoveAll(java.util.Collection<?> c)booleanretainAll(java.util.Collection<?> c)Eset(int index, E element)Does not support List methodsUnsupportedOperationException.intsize()java.util.List<E>subList(int fromIndex, int toIndex)Does not support List methodsUnsupportedOperationException.java.lang.Object[]toArray()<T> T[]toArray(T[] a)
-
-
-
Constructor Detail
-
SetAsList
public SetAsList(java.util.Set<E> set)
- Parameters:
set-
-
-
Method Detail
-
size
public int size()
-
isEmpty
public boolean isEmpty()
-
contains
public boolean contains(java.lang.Object o)
-
iterator
public java.util.Iterator<E> iterator()
-
toArray
public java.lang.Object[] toArray()
-
toArray
public <T> T[] toArray(T[] a)
-
add
public boolean add(E e)
-
remove
public boolean remove(java.lang.Object o)
-
containsAll
public boolean containsAll(java.util.Collection<?> c)
-
addAll
public boolean addAll(java.util.Collection<? extends E> c)
-
addAll
public boolean addAll(int index, java.util.Collection<? extends E> c)Does not support List methodsUnsupportedOperationException.- Specified by:
addAllin interfacejava.util.List<E>
-
removeAll
public boolean removeAll(java.util.Collection<?> c)
-
retainAll
public boolean retainAll(java.util.Collection<?> c)
-
clear
public void clear()
-
get
public E get(int index)
Does not support List methodsUnsupportedOperationException.- Specified by:
getin interfacejava.util.List<E>- Parameters:
index- Index
-
set
public E set(int index, E element)
Does not support List methodsUnsupportedOperationException.- Specified by:
setin interfacejava.util.List<E>
-
add
public void add(int index, E element)Does not support List methodsUnsupportedOperationException.- Specified by:
addin interfacejava.util.List<E>
-
remove
public E remove(int index)
Does not support List methodsUnsupportedOperationException.- Specified by:
removein interfacejava.util.List<E>
-
indexOf
public int indexOf(java.lang.Object o)
Does not support List methodsUnsupportedOperationException.- Specified by:
indexOfin interfacejava.util.List<E>
-
lastIndexOf
public int lastIndexOf(java.lang.Object o)
Does not support List methodsUnsupportedOperationException.- Specified by:
lastIndexOfin interfacejava.util.List<E>
-
listIterator
public java.util.ListIterator<E> listIterator()
Does not support List methodsUnsupportedOperationException.- Specified by:
listIteratorin interfacejava.util.List<E>
-
listIterator
public java.util.ListIterator<E> listIterator(int index)
Does not support List methodsUnsupportedOperationException.- Specified by:
listIteratorin interfacejava.util.List<E>
-
-