@NotThreadSafe public class RedirectLocations extends AbstractList<Object>
URI
s used
as redirect locations.modCount
Constructor and Description |
---|
RedirectLocations() |
Modifier and Type | Method and Description |
---|---|
void |
add(int index,
Object element)
Inserts the specified element at the specified position in this list
(must be a URI).
|
void |
add(URI uri)
Adds a new URI to the collection.
|
boolean |
contains(Object o)
Returns true if this collection contains the specified element.
|
boolean |
contains(URI uri)
Test if the URI is present in the collection.
|
URI |
get(int index)
Returns the URI at the specified position in this list.
|
List<URI> |
getAll()
Returns all redirect
URI s in the order they were added to the collection. |
URI |
remove(int index)
Removes the URI at the specified position in this list.
|
boolean |
remove(URI uri)
Removes a URI from the collection.
|
Object |
set(int index,
Object element)
Replaces the URI at the specified position in this list with the
specified element (must be a URI).
|
int |
size()
Returns the number of elements in this list.
|
add, addAll, clear, equals, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, removeRange, subList
addAll, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
addAll, containsAll, isEmpty, remove, removeAll, replaceAll, retainAll, sort, spliterator, toArray, toArray
parallelStream, removeIf, stream
public boolean contains(URI uri)
public void add(URI uri)
public boolean remove(URI uri)
public List<URI> getAll()
URI
s in the order they were added to the collection.public URI get(int index)
get
in interface List<Object>
get
in class AbstractList<Object>
index
- index of the location to returnIndexOutOfBoundsException
- if the index is out of range (
index < 0 || index >= size())public int size()
size
in interface Collection<Object>
size
in interface List<Object>
size
in class AbstractCollection<Object>
public Object set(int index, Object element)
set
in interface List<Object>
set
in class AbstractList<Object>
index
- index of the element to replaceelement
- URI to be stored at the specified positionUnsupportedOperationException
- if the set operation is not supported by this listClassCastException
- if the element is not a URI
NullPointerException
- if the specified element is null and this list does not
permit null elementsIndexOutOfBoundsException
- if the index is out of range (
index < 0 || index >= size())public void add(int index, Object element)
add
in interface List<Object>
add
in class AbstractList<Object>
index
- index at which the specified element is to be insertedelement
- URI to be insertedUnsupportedOperationException
- if the add operation is not supported by this listClassCastException
- if the element is not a URI
NullPointerException
- if the specified element is null and this list does not
permit null elementsIndexOutOfBoundsException
- if the index is out of range (
index < 0 || index > size())public URI remove(int index)
remove
in interface List<Object>
remove
in class AbstractList<Object>
index
- the index of the URI to be removedIndexOutOfBoundsException
- if the index is out of range (
index < 0 || index >= size())public boolean contains(Object o)
contains
in interface Collection<Object>
contains
in interface List<Object>
contains
in class AbstractCollection<Object>
o
- element whose presence in this collection is to be testedCopyright © 1999–2018 The Apache Software Foundation. All rights reserved.