Class RedirectLocations
- java.lang.Object
-
- org.apache.hc.client5.http.protocol.RedirectLocations
-
public final class RedirectLocations extends java.lang.Object
This class represents a collection ofURI
s used as redirect locations.- Since:
- 4.0
-
-
Constructor Summary
Constructors Constructor Description RedirectLocations()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(java.net.URI uri)
Adds a new URI to the collection.void
clear()
boolean
contains(java.net.URI uri)
Test if the URI is present in the collection.java.net.URI
get(int index)
Returns the URI at the specified position in this list.java.util.List<java.net.URI>
getAll()
Returns all redirectURI
s in the order they were added to the collection.int
size()
Returns the number of elements in this list.
-
-
-
Method Detail
-
contains
public boolean contains(java.net.URI uri)
Test if the URI is present in the collection.
-
add
public void add(java.net.URI uri)
Adds a new URI to the collection.
-
getAll
public java.util.List<java.net.URI> getAll()
Returns all redirectURI
s in the order they were added to the collection.- Returns:
- list of all URIs
- Since:
- 4.1
-
get
public java.net.URI get(int index)
Returns the URI at the specified position in this list.- Parameters:
index
- index of the location to return- Returns:
- the URI at the specified position in this list
- Throws:
java.lang.IndexOutOfBoundsException
- if the index is out of range (index < 0 || index >= size()
)- Since:
- 4.3
-
size
public int size()
Returns the number of elements in this list. If this list contains more thanInteger.MAX_VALUE
elements, returnsInteger.MAX_VALUE
.- Returns:
- the number of elements in this list
- Since:
- 4.3
-
clear
public void clear()
-
-