Class RedirectLocations
java.lang.Object
org.apache.hc.client5.http.protocol.RedirectLocations
This class represents a collection of
URI
s used
as redirect locations.- Since:
- 4.0
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds a new URI to the collection.void
clear()
boolean
Test if the URI is present in the collection.get
(int index) Returns the URI at the specified position in this list.getAll()
Returns all redirectURI
s in the order they were added to the collection.int
size()
Returns the number of elements in this list.
-
Field Details
-
unique
-
all
-
-
Constructor Details
-
RedirectLocations
public RedirectLocations()
-
-
Method Details
-
contains
Test if the URI is present in the collection. -
add
Adds a new URI to the collection. -
getAll
Returns all redirectURI
s in the order they were added to the collection.- Returns:
- list of all URIs
- Since:
- 4.1
-
get
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:
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()
-