com.compoze.collab.util
Class EmptyList
java.lang.Object
com.compoze.collab.util.EmptyList
- All Implemented Interfaces
- Iterable, Collection, List
public class EmptyList
- extends Object
- implements List
An always-empty List. A Singleton. Use i() to retrieve the instance.
All methods that would add objects to this list throw
UnsupportedOperationException. Most methods that remove
objects are supported, but indicate that nothing was removed.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
i
public static EmptyList i()
- Get the instance.
- Returns
- the EmptyList instance
size
public int size()
- Specified by:
size in interface Collection- Specified by:
size in interface List
isEmpty
public boolean isEmpty()
- Specified by:
isEmpty in interface Collection- Specified by:
isEmpty in interface List
contains
public boolean contains(Object o)
- Specified by:
contains in interface Collection- Specified by:
contains in interface List
iterator
public Iterator iterator()
- Specified by:
iterator in interface Iterable- Specified by:
iterator in interface Collection- Specified by:
iterator in interface List
toArray
public Object[] toArray()
- Specified by:
toArray in interface Collection- Specified by:
toArray in interface List
toArray
public Object[] toArray(Object[] a)
- Specified by:
toArray in interface Collection- Specified by:
toArray in interface List
add
public boolean add(Object o)
- Specified by:
add in interface Collection- Specified by:
add in interface List
remove
public boolean remove(Object o)
- Specified by:
remove in interface Collection- Specified by:
remove in interface List
containsAll
public boolean containsAll(Collection c)
- Specified by:
containsAll in interface Collection- Specified by:
containsAll in interface List
addAll
public boolean addAll(Collection c)
- Specified by:
addAll in interface Collection- Specified by:
addAll in interface List
addAll
public boolean addAll(int index,
Collection c)
- Specified by:
addAll in interface List
removeAll
public boolean removeAll(Collection c)
- Specified by:
removeAll in interface Collection- Specified by:
removeAll in interface List
retainAll
public boolean retainAll(Collection c)
- Specified by:
retainAll in interface Collection- Specified by:
retainAll in interface List
clear
public void clear()
- Specified by:
clear in interface Collection- Specified by:
clear in interface List
get
public Object get(int index)
- Specified by:
get in interface List
set
public Object set(int index,
Object element)
- Specified by:
set in interface List
add
public void add(int index,
Object element)
- Specified by:
add in interface List
remove
public Object remove(int index)
- Specified by:
remove in interface List
indexOf
public int indexOf(Object o)
- Specified by:
indexOf in interface List
lastIndexOf
public int lastIndexOf(Object o)
- Specified by:
lastIndexOf in interface List
listIterator
public ListIterator listIterator()
- Specified by:
listIterator in interface List
listIterator
public ListIterator listIterator(int index)
- Specified by:
listIterator in interface List
subList
public List subList(int fromIndex,
int toIndex)
- Specified by:
subList in interface List
Copyright © 2006 BEA Systems, Inc. All Rights Reserved