org.jibx.binding.model
Class EmptyArrayList
java.lang.Object
java.util.AbstractCollection<E>
java.util.AbstractList<E>
java.util.ArrayList
org.jibx.binding.model.EmptyArrayList
- All Implemented Interfaces:
- Serializable, Cloneable, Iterable, Collection, List, RandomAccess
public class EmptyArrayList
- extends ArrayList
Unmodifiable empty array list. This defines a singleton instance of itself,
which can then be used whereever an empty list is convenient. This class is
required to support methods which return instances of java.util.ArrayList in
order to guarantee random access to the returned list in constant time as
part of the method contract. java.util.Collection.EMPTY_LIST is not an
instance of java.util.ArrayList, so it cannot be used.
- Author:
- Dennis M. Sosnoski
- See Also:
- Serialized Form
INSTANCE
public static final EmptyArrayList INSTANCE
add
public void add(int index,
Object element)
- Specified by:
add in interface List- Overrides:
add in class ArrayList
add
public boolean add(Object o)
- Specified by:
add in interface Collection- Specified by:
add in interface List- Overrides:
add in class ArrayList
addAll
public boolean addAll(Collection c)
- Specified by:
addAll in interface Collection- Specified by:
addAll in interface List- Overrides:
addAll in class ArrayList
addAll
public boolean addAll(int index,
Collection c)
- Specified by:
addAll in interface List- Overrides:
addAll in class ArrayList
ensureCapacity
public void ensureCapacity(int minCapacity)
- Overrides:
ensureCapacity in class ArrayList
clear
public void clear()
- Specified by:
clear in interface Collection- Specified by:
clear in interface List- Overrides:
clear in class ArrayList
remove
public Object remove(int index)
- Specified by:
remove in interface List- Overrides:
remove in class ArrayList
remove
public boolean remove(Object o)
- Specified by:
remove in interface Collection- Specified by:
remove in interface List- Overrides:
remove in class ArrayList
removeRange
protected void removeRange(int fromIndex,
int toIndex)
- Overrides:
removeRange in class ArrayList
set
public Object set(int index,
Object element)
- Specified by:
set in interface List- Overrides:
set in class ArrayList
trimToSize
public void trimToSize()
- Overrides:
trimToSize in class ArrayList
removeAll
public boolean removeAll(Collection c)
- Specified by:
removeAll in interface Collection- Specified by:
removeAll in interface List- Overrides:
removeAll in class AbstractCollection
retainAll
public boolean retainAll(Collection c)
- Specified by:
retainAll in interface Collection- Specified by:
retainAll in interface List- Overrides:
retainAll in class AbstractCollection
Copyright © 2005-2011 jibx.org. All Rights Reserved.