Package org.restlet.client.util
Class ClientList
- java.lang.Object
-
- org.restlet.client.util.WrapperList<Client>
-
- org.restlet.client.util.ClientList
-
- All Implemented Interfaces:
java.lang.Iterable<Client>,java.util.Collection<Client>,java.util.List<Client>
public final class ClientList extends WrapperList<Client>
Modifiable list of client connectors.- Author:
- Jerome Louvel
-
-
Constructor Summary
Constructors Constructor Description ClientList(Context context)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanadd(Client client)Adds a element at the end of the list.Clientadd(Protocol protocol)Adds a new client connector in the map supporting the given protocol.ContextgetContext()Returns the context.voidsetContext(Context context)Sets the context.-
Methods inherited from class org.restlet.client.util.WrapperList
add, addAll, addAll, clear, contains, containsAll, equals, get, getDelegate, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, retainAll, set, size, subList, toArray, toArray, toString
-
-
-
-
Constructor Detail
-
ClientList
public ClientList(Context context)
Constructor.- Parameters:
context- The context.
-
-
Method Detail
-
add
public boolean add(Client client)
Description copied from class:WrapperListAdds a element at the end of the list.- Specified by:
addin interfacejava.util.Collection<Client>- Specified by:
addin interfacejava.util.List<Client>- Overrides:
addin classWrapperList<Client>- Returns:
- True (as per the general contract of the Collection.add method).
-
add
public Client add(Protocol protocol)
Adds a new client connector in the map supporting the given protocol.- Parameters:
protocol- The connector protocol.- Returns:
- The added client.
-
getContext
public Context getContext()
Returns the context.- Returns:
- The context.
-
setContext
public void setContext(Context context)
Sets the context.- Parameters:
context- The context.
-
-