org.indy
Class CommandHandlers

java.lang.Object
  |
  +--org.indy.CommandHandlers
All Implemented Interfaces:
java.util.Collection, java.util.List

public class CommandHandlers
extends java.lang.Object
implements java.util.List

A specialized collection class for IdCommnandHandler This class is not thread safe without external sync.

Author:
OTG

Constructor Summary
CommandHandlers(TCPServer server)
          Constructs a new IdCommandHandlers collection.
 
Method Summary
 void add(CommandHandler ch)
          Adds an IdCommandHandler to this collection.
 void add(CommandHandler ch, int index)
          Adds an IdCommandHandler to this collection at the specified index.
 void add(int index, java.lang.Object element)
          DOCUMENT ME!
 boolean add(java.lang.Object o)
          DOCUMENT ME!
 boolean addAll(java.util.Collection c)
          DOCUMENT ME!
 boolean addAll(int index, java.util.Collection c)
          DOCUMENT ME!
 void clear()
          DOCUMENT ME!
 boolean contains(java.lang.Object o)
          DOCUMENT ME!
 boolean containsAll(java.util.Collection c)
          DOCUMENT ME!
 boolean equals(java.lang.Object o)
          DOCUMENT ME!
 java.lang.Object get(int index)
          DOCUMENT ME!
 CommandHandler getCommandHandler(int index)
          Returns the IdCommandHandler instance at index
 TCPServer getServer()
          Returns the IdTCPServer that owns this collection.
 int indexOf(java.lang.Object o)
          DOCUMENT ME!
 boolean isEmpty()
          DOCUMENT ME!
 java.util.Iterator iterator()
          DOCUMENT ME!
 int lastIndexOf(java.lang.Object o)
          DOCUMENT ME!
 java.util.ListIterator listIterator()
          DOCUMENT ME!
 java.util.ListIterator listIterator(int index)
          DOCUMENT ME!
 java.lang.Object remove(int index)
          DOCUMENT ME!
 boolean remove(java.lang.Object o)
          DOCUMENT ME!
 boolean removeAll(java.util.Collection c)
          DOCUMENT ME!
 boolean retainAll(java.util.Collection c)
          DOCUMENT ME!
 java.lang.Object set(int index, java.lang.Object element)
          DOCUMENT ME!
 int size()
          Returns the number of elements in this collection.
 java.util.List subList(int fromIndex, int toIndex)
          DOCUMENT ME!
 java.lang.Object[] toArray()
          DOCUMENT ME!
 java.lang.Object[] toArray(java.lang.Object[] a)
          DOCUMENT ME!
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.List
hashCode
 

Constructor Detail

CommandHandlers

public CommandHandlers(TCPServer server)
Constructs a new IdCommandHandlers collection.
Parameters:
server - The server instance that owns this collection.
Method Detail

isEmpty

public boolean isEmpty()
DOCUMENT ME!
Specified by:
isEmpty in interface java.util.List
Returns:
DOCUMENT ME!

getCommandHandler

public CommandHandler getCommandHandler(int index)
Returns the IdCommandHandler instance at index
Parameters:
index - The index of the reuiqred handler.
Returns:
The IdCommandHandler at index
Throws:
java.lang.IndexOutOfBoundsException - if index is invalid.

getServer

public TCPServer getServer()
Returns the IdTCPServer that owns this collection.
Returns:
The IdTCPServer for this collection.

add

public void add(CommandHandler ch)
Adds an IdCommandHandler to this collection.
Parameters:
ch - The IdCommandHandler to add.

add

public void add(CommandHandler ch,
                int index)
Adds an IdCommandHandler to this collection at the specified index.
Parameters:
ch - The IdCommandHandler to add.
index - The index to add at.
Throws:
java.lang.IndexOutOfBoundsException - If index is invalid.

size

public int size()
Returns the number of elements in this collection.
Specified by:
size in interface java.util.List
Returns:
The number of elements in this collection.

contains

public boolean contains(java.lang.Object o)
DOCUMENT ME!
Specified by:
contains in interface java.util.List
Parameters:
o - DOCUMENT ME!
Returns:
DOCUMENT ME!

iterator

public java.util.Iterator iterator()
DOCUMENT ME!
Specified by:
iterator in interface java.util.List
Returns:
DOCUMENT ME!

toArray

public java.lang.Object[] toArray()
DOCUMENT ME!
Specified by:
toArray in interface java.util.List
Returns:
DOCUMENT ME!

toArray

public java.lang.Object[] toArray(java.lang.Object[] a)
DOCUMENT ME!
Specified by:
toArray in interface java.util.List
Parameters:
a - DOCUMENT ME!
Returns:
DOCUMENT ME!

add

public boolean add(java.lang.Object o)
DOCUMENT ME!
Specified by:
add in interface java.util.List
Parameters:
o - DOCUMENT ME!
Returns:
DOCUMENT ME!

remove

public boolean remove(java.lang.Object o)
DOCUMENT ME!
Specified by:
remove in interface java.util.List
Parameters:
o - DOCUMENT ME!
Returns:
DOCUMENT ME!

containsAll

public boolean containsAll(java.util.Collection c)
DOCUMENT ME!
Specified by:
containsAll in interface java.util.List
Parameters:
c - DOCUMENT ME!
Returns:
DOCUMENT ME!

addAll

public boolean addAll(java.util.Collection c)
DOCUMENT ME!
Specified by:
addAll in interface java.util.List
Parameters:
c - DOCUMENT ME!
Returns:
DOCUMENT ME!

addAll

public boolean addAll(int index,
                      java.util.Collection c)
DOCUMENT ME!
Specified by:
addAll in interface java.util.List
Parameters:
index - DOCUMENT ME!
c - DOCUMENT ME!
Returns:
DOCUMENT ME!

removeAll

public boolean removeAll(java.util.Collection c)
DOCUMENT ME!
Specified by:
removeAll in interface java.util.List
Parameters:
c - DOCUMENT ME!
Returns:
DOCUMENT ME!

retainAll

public boolean retainAll(java.util.Collection c)
DOCUMENT ME!
Specified by:
retainAll in interface java.util.List
Parameters:
c - DOCUMENT ME!
Returns:
DOCUMENT ME!

clear

public void clear()
DOCUMENT ME!
Specified by:
clear in interface java.util.List

equals

public boolean equals(java.lang.Object o)
DOCUMENT ME!
Specified by:
equals in interface java.util.List
Overrides:
equals in class java.lang.Object
Parameters:
o - DOCUMENT ME!
Returns:
DOCUMENT ME!

get

public java.lang.Object get(int index)
DOCUMENT ME!
Specified by:
get in interface java.util.List
Parameters:
index - DOCUMENT ME!
Returns:
DOCUMENT ME!

set

public java.lang.Object set(int index,
                            java.lang.Object element)
DOCUMENT ME!
Specified by:
set in interface java.util.List
Parameters:
index - DOCUMENT ME!
element - DOCUMENT ME!
Returns:
DOCUMENT ME!

add

public void add(int index,
                java.lang.Object element)
DOCUMENT ME!
Specified by:
add in interface java.util.List
Parameters:
index - DOCUMENT ME!
element - DOCUMENT ME!

remove

public java.lang.Object remove(int index)
DOCUMENT ME!
Specified by:
remove in interface java.util.List
Parameters:
index - DOCUMENT ME!
Returns:
DOCUMENT ME!

indexOf

public int indexOf(java.lang.Object o)
DOCUMENT ME!
Specified by:
indexOf in interface java.util.List
Parameters:
o - DOCUMENT ME!
Returns:
DOCUMENT ME!

lastIndexOf

public int lastIndexOf(java.lang.Object o)
DOCUMENT ME!
Specified by:
lastIndexOf in interface java.util.List
Parameters:
o - DOCUMENT ME!
Returns:
DOCUMENT ME!

listIterator

public java.util.ListIterator listIterator()
DOCUMENT ME!
Specified by:
listIterator in interface java.util.List
Returns:
DOCUMENT ME!

listIterator

public java.util.ListIterator listIterator(int index)
DOCUMENT ME!
Specified by:
listIterator in interface java.util.List
Parameters:
index - DOCUMENT ME!
Returns:
DOCUMENT ME!

subList

public java.util.List subList(int fromIndex,
                              int toIndex)
DOCUMENT ME!
Specified by:
subList in interface java.util.List
Parameters:
fromIndex - DOCUMENT ME!
toIndex - DOCUMENT ME!
Returns:
DOCUMENT ME!


Copyright © 2002-2002 IndyJ. All Rights Reserved.