dsto.dfc.collections
Class FixedArraySetList
java.lang.Object
java.util.AbstractCollection<E>
java.util.AbstractList
dsto.dfc.collections.FixedArraySetList
- All Implemented Interfaces:
- Iterable, Collection, List, Set
public class FixedArraySetList
- extends AbstractList
- implements List, Set
A wrapper around an array that makes it appear as both an
unmodifiable set and an unmodifiable list.
- Version:
- $Revision$
| Methods inherited from interface java.util.List |
add, add, addAll, addAll, clear, containsAll, equals, hashCode, isEmpty, remove, remove, removeAll, retainAll, set, subList, toArray |
| Methods inherited from interface java.util.Set |
add, addAll, clear, containsAll, equals, hashCode, isEmpty, remove, removeAll, retainAll, toArray |
FixedArraySetList
public FixedArraySetList(Object[] values)
- Create a set backed by an array of values. The values must not
contain duplicates.
get
public Object get(int index)
- Specified by:
get in interface List- Specified by:
get in class AbstractList
indexOf
public int indexOf(Object o)
- Specified by:
indexOf in interface List- Overrides:
indexOf in class AbstractList
lastIndexOf
public int lastIndexOf(Object o)
- Specified by:
lastIndexOf in interface List- Overrides:
lastIndexOf in class AbstractList
listIterator
public ListIterator listIterator()
- Specified by:
listIterator in interface List- Overrides:
listIterator in class AbstractList
listIterator
public ListIterator listIterator(int index)
- Specified by:
listIterator in interface List- Overrides:
listIterator in class AbstractList
iterator
public Iterator iterator()
- Specified by:
iterator in interface Iterable- Specified by:
iterator in interface Collection- Specified by:
iterator in interface List- Specified by:
iterator in interface Set- Overrides:
iterator in class AbstractList
size
public int size()
- Specified by:
size in interface Collection- Specified by:
size in interface List- Specified by:
size in interface Set- Specified by:
size in class AbstractCollection
contains
public boolean contains(Object o)
- Specified by:
contains in interface Collection- Specified by:
contains in interface List- Specified by:
contains in interface Set- Overrides:
contains in class AbstractCollection
toArray
public Object[] toArray()
- Specified by:
toArray in interface Collection- Specified by:
toArray in interface List- Specified by:
toArray in interface Set- Overrides:
toArray in class AbstractCollection
Copyright © 2008 Commonwealth of Australia