|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectproper.remote.ClientList
public class ClientList
This class manages a list of clients.
Constructor Summary | |
---|---|
ClientList()
initializes the object |
Method Summary | |
---|---|
void |
add(java.net.InetSocketAddress client)
adds the given client to the list |
void |
add(java.net.InetSocketAddress client,
java.lang.String job)
adds the given client with its job to the list |
boolean |
contains(java.net.InetSocketAddress client)
checks whether the given client is already in the list |
java.net.InetSocketAddress |
get(int index)
returns the specified client, NULL if index is out of bounds |
java.lang.String |
getJob(int index)
returns the job of a specified client, NULL if index is out of bounds |
int |
indexOf(java.net.InetSocketAddress client)
returns the index of the given client in the list |
java.net.InetSocketAddress |
peek()
takes a look at the topmost client on the stack, can be NULL |
java.net.InetSocketAddress |
peekJob()
takes a look at the topmost job on the stack, can be NULL |
java.net.InetSocketAddress |
pop()
returns the current topmost client from the list (like from a stack), it also removes the associated job |
void |
push(java.net.InetSocketAddress client)
adds the given client to the list (like on a stack) |
void |
push(java.net.InetSocketAddress client,
java.lang.String job)
adds the given client and its job to the list (like on a stack) |
java.net.InetSocketAddress |
remove(java.net.InetSocketAddress client)
removes the specified client (and its job) from the list |
java.net.InetSocketAddress |
remove(int index)
removes the specified client (and its job) from the list |
int |
size()
the number of clients currently in the list |
java.lang.String |
toString()
the list in a string representation |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ClientList()
Method Detail |
---|
public int size()
public java.net.InetSocketAddress get(int index)
public java.lang.String getJob(int index)
public boolean contains(java.net.InetSocketAddress client)
public int indexOf(java.net.InetSocketAddress client)
public void add(java.net.InetSocketAddress client)
public void add(java.net.InetSocketAddress client, java.lang.String job)
public java.net.InetSocketAddress remove(int index)
public java.net.InetSocketAddress remove(java.net.InetSocketAddress client)
public void push(java.net.InetSocketAddress client)
public void push(java.net.InetSocketAddress client, java.lang.String job)
public java.net.InetSocketAddress pop()
public java.net.InetSocketAddress peek()
public java.net.InetSocketAddress peekJob()
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |