Package mondrian.util
Class UnsupportedList<T>
java.lang.Object
mondrian.util.UnsupportedList<T>
- All Implemented Interfaces:
Iterable<T>,Collection<T>,List<T>
- Direct Known Subclasses:
TraversalList
Implementation of
List where all methods throw
an UnsupportedOperationException exception except for the
isEmpty method. The iterator and
listIterator methods can be easily implemented in
derived classes by using the helper inner classes:
Itr and ListItr.
These iterators are all read only,
their remove, add and set
methods throw the
UnsupportedOperationException exception.
This class can be used for List implementations that only implement a subset of all the methods.
- Since:
- Jan 16, 2007
- Author:
- Richard Emberson
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected classprotected classIterator for arrays of a priori unknown size.protected class -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidbooleanbooleanaddAll(int index, Collection<? extends T> c) booleanaddAll(Collection<? extends T> c) voidclear()booleanbooleancontainsAll(Collection<?> c) booleanget(int index) inthashCode()intbooleanisEmpty()iterator()intlistIterator(int index) remove(int index) booleanbooleanremoveAll(Collection<?> c) booleanretainAll(Collection<?> c) intsize()subList(int fromIndex, int toIndex) Object[]toArray()<T> T[]toArray(T[] a) Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArrayMethods inherited from interface java.util.List
replaceAll, sort, spliterator
-
Constructor Details
-
UnsupportedList
protected UnsupportedList()
-
-
Method Details
-
isEmpty
public boolean isEmpty() -
size
public int size() -
get
-
set
-
toArray
-
add
-
remove
-
indexOf
-
lastIndexOf
- Specified by:
lastIndexOfin interfaceList<T>
-
subList
-
contains
-
toArray
public <T> T[] toArray(T[] a) -
add
-
remove
-
containsAll
- Specified by:
containsAllin interfaceCollection<T>- Specified by:
containsAllin interfaceList<T>
-
addAll
-
addAll
-
removeAll
-
retainAll
-
clear
public void clear() -
equals
-
hashCode
public int hashCode() -
listIterator
- Specified by:
listIteratorin interfaceList<T>
-
listIterator
- Specified by:
listIteratorin interfaceList<T>
-
iterator
-