Package org.archive.modules.fetcher
Class BdbCookieStore.RestrictedCollectionWrappedList<T>
java.lang.Object
org.archive.modules.fetcher.BdbCookieStore.RestrictedCollectionWrappedList<T>
- All Implemented Interfaces:
Iterable<T>
,Collection<T>
,List<T>
- Enclosing class:
- BdbCookieStore
public static class BdbCookieStore.RestrictedCollectionWrappedList<T> extends Object implements List<T>
A
List
implementation that wraps a Collection
. Needed
because httpclient requires List<Cookie>
.
This class is "restricted" in the sense that it is immutable, and also
because some methods throw RuntimeException
because they don't
make sense in this context.
-
Constructor Summary
Constructors Constructor Description RestrictedCollectionWrappedList(Collection<T> wrapped)
-
Method Summary
Modifier and Type Method Description void
add(int index, T element)
boolean
add(T e)
boolean
addAll(int index, Collection<? extends T> c)
boolean
addAll(Collection<? extends T> c)
void
clear()
boolean
contains(Object o)
boolean
containsAll(Collection<?> c)
T
get(int index)
int
indexOf(Object o)
boolean
isEmpty()
Iterator<T>
iterator()
int
lastIndexOf(Object o)
ListIterator<T>
listIterator()
ListIterator<T>
listIterator(int index)
T
remove(int index)
boolean
remove(Object o)
boolean
removeAll(Collection<?> c)
boolean
retainAll(Collection<?> c)
T
set(int index, T element)
int
size()
List<T>
subList(int fromIndex, int toIndex)
Object[]
toArray()
<T> T[]
toArray(T[] a)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
Methods inherited from interface java.util.List
equals, hashCode, replaceAll, sort, spliterator
-
Constructor Details
-
RestrictedCollectionWrappedList
-
-
Method Details
-
size
public int size() -
isEmpty
public boolean isEmpty() -
contains
-
iterator
-
toArray
-
toArray
public <T> T[] toArray(T[] a) -
add
-
remove
-
containsAll
- Specified by:
containsAll
in interfaceCollection<T>
- Specified by:
containsAll
in interfaceList<T>
-
addAll
-
addAll
-
removeAll
-
retainAll
-
clear
public void clear() -
get
-
set
-
add
-
remove
-
indexOf
-
lastIndexOf
- Specified by:
lastIndexOf
in interfaceList<T>
-
listIterator
- Specified by:
listIterator
in interfaceList<T>
-
listIterator
- Specified by:
listIterator
in interfaceList<T>
-
subList
-