public final class RouteList extends WrapperList<Route>
List interface using the Route class as the generic
type. This allows you to use an instance of this class as any other
List, in particular all the helper methods in
Collections.CopyOnWriteArrayList.Collections,
List| Constructor and Description |
|---|
RouteList()
Constructor.
|
RouteList(List<Route> delegate)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
Route |
getBest(Request request,
Response response,
float requiredScore)
Returns the best route match for a given call.
|
Route |
getFirst(Request request,
Response response,
float requiredScore)
Returns the first route match for a given call.
|
Route |
getLast(Request request,
Response response,
float requiredScore)
Returns the last route match for a given call.
|
Route |
getNext(Request request,
Response response,
float requiredScore)
Returns a next route match in a round robin mode for a given call.
|
Route |
getRandom(Request request,
Response response,
float requiredScore)
Returns a random route match for a given call.
|
void |
removeAll(Restlet target)
Removes all routes routing to a given target.
|
RouteList |
subList(int fromIndex,
int toIndex)
Returns a view of the portion of this list between the specified fromIndex,
inclusive, and toIndex, exclusive.
|
add, add, addAll, addAll, clear, contains, containsAll, equals, get, getDelegate, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, retainAll, set, size, toArray, toArray, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitreplaceAll, sort, spliteratorparallelStream, removeIf, streampublic Route getBest(Request request, Response response, float requiredScore)
request - The request to score.response - The response to score.requiredScore - The minimum score required to have a match.public Route getFirst(Request request, Response response, float requiredScore)
request - The request to score.response - The response to score.requiredScore - The minimum score required to have a match.public Route getLast(Request request, Response response, float requiredScore)
request - The request to score.response - The response to score.requiredScore - The minimum score required to have a match.public Route getNext(Request request, Response response, float requiredScore)
request - The request to score.response - The response to score.requiredScore - The minimum score required to have a match.public Route getRandom(Request request, Response response, float requiredScore)
request - The request to score.response - The response to score.requiredScore - The minimum score required to have a match.public void removeAll(Restlet target)
target - The target Restlet to detach.public RouteList subList(int fromIndex, int toIndex)
Copyright © 2005–2025. All rights reserved.