rrdService.util
Class RoundRobinContainer

java.lang.Object
  |
  +--java.util.AbstractCollection
        |
        +--java.util.AbstractList
              |
              +--java.util.Vector
                    |
                    +--rrdService.util.RoundRobinContainer
All Implemented Interfaces:
java.lang.Cloneable, java.util.Collection, java.util.List, java.io.Serializable

public class RoundRobinContainer
extends java.util.Vector

The class RoundRobinContainer allows to transmits a Container of RoundRobinDataBase to client

Version:
1.0 date : 15/07/2001
Author:
Damien Pellier
See Also:
RoundRobinContainer, RoundRobin, Serialized Form

Fields inherited from class java.util.Vector
capacityIncrement, elementCount, elementData, serialVersionUID
 
Fields inherited from class java.util.AbstractList
modCount
 
Constructor Summary
RoundRobinContainer()
          Constructs an empty RoundRobinContainer so that its internal data array has size 10 and its standard capacity increment is zero.
RoundRobinContainer(java.util.Collection c)
          Constructs a RoundRobinContainer containing the RoundRobinItf of the specified collection, in the order they are returned by the collection's iterator.
RoundRobinContainer(int initialCapacity)
          Constructs an empty RoundRobinContainer with the specified initial capacity and with its capacity increment equal to zero. param initialCapacity the initial capacity of the RoundRobinContainer.
RoundRobinContainer(int initialCapacity, int capacityIncrement)
          Constructs an empty RoundRobinContainer with the specified initial capacity and capacity increment.
 
Method Summary
 RoundRobinContainer cloneRoundRobinContainer()
          Returns a clone of this RoundRobinContainer. return RoundRobinContainer
 RoundRobinItf firstRoundRobin()
          Returns the first component (the item at index 0) of this RoundRobinContainer.
 RoundRobinItf getRoundRobin(int index)
          Returns the RoundRobinItf at the specified position in this RoundRobinContainer.
 RoundRobinItf lastRoundRobin()
          Returns the last component of the RoundRobinContainer.
 RoundRobinItf removeRoundRobin(int index)
          Removes the RoundRobinItf at the specified position in this RoundRobinContainer.
 RoundRobinItf roundRobinAt(int index)
          Returns the component at the specified index.
 RoundRobinItf setRoundRobin(int index, RoundRobinItf lib)
          Replaces the RoundRobinItf at the specified position in this RoundRobinContainer with the specified RoundRobinItf.
 RoundRobinItf[] toRoundRobinArray()
          Returns an array containing all of the RoundRobinItf in this RoundRobinContainer in the correct order.
 RoundRobinItf[] toRoundRobinArray(RoundRobinItf[] a)
          Returns an array containing all of the RoundRobinItf in this RoundRobinContainer in the correct order.
 
Methods inherited from class java.util.Vector
add, add, addAll, addAll, addElement, capacity, clear, clone, contains, containsAll, copyInto, elementAt, elements, ensureCapacity, ensureCapacityHelper, equals, firstElement, get, hashCode, indexOf, indexOf, insertElementAt, isEmpty, lastElement, lastIndexOf, lastIndexOf, remove, remove, removeAll, removeAllElements, removeElement, removeElementAt, removeRange, retainAll, set, setElementAt, setSize, size, subList, toArray, toArray, toString, trimToSize
 
Methods inherited from class java.util.AbstractList
iterator, listIterator, listIterator
 
Methods inherited from class java.lang.Object
, finalize, getClass, notify, notifyAll, registerNatives, wait, wait, wait
 
Methods inherited from interface java.util.List
iterator, listIterator, listIterator
 

Constructor Detail

RoundRobinContainer

public RoundRobinContainer()
Constructs an empty RoundRobinContainer so that its internal data array has size 10 and its standard capacity increment is zero.

RoundRobinContainer

public RoundRobinContainer(java.util.Collection c)
Constructs a RoundRobinContainer containing the RoundRobinItf of the specified collection, in the order they are returned by the collection's iterator.
Parameters:
c - the collection whose RoundRobinItfs are to be placed into this RoundRobinContainer.

RoundRobinContainer

public RoundRobinContainer(int initialCapacity)
                    throws java.lang.IllegalArgumentException
Constructs an empty RoundRobinContainer with the specified initial capacity and with its capacity increment equal to zero. param initialCapacity the initial capacity of the RoundRobinContainer.

RoundRobinContainer

public RoundRobinContainer(int initialCapacity,
                           int capacityIncrement)
                    throws java.lang.IllegalArgumentException
Constructs an empty RoundRobinContainer with the specified initial capacity and capacity increment.
Parameters:
initialCapacity - the initial capacity of the RoundRobinContainer.
capacityIncrement - the amount by which the capacity is increased when the RoundRobinContainer overflows
Method Detail

cloneRoundRobinContainer

public RoundRobinContainer cloneRoundRobinContainer()
Returns a clone of this RoundRobinContainer. return RoundRobinContainer

firstRoundRobin

public RoundRobinItf firstRoundRobin()
                              throws java.util.NoSuchElementException
Returns the first component (the item at index 0) of this RoundRobinContainer.
Returns:
RoundRobinItf

getRoundRobin

public RoundRobinItf getRoundRobin(int index)
                            throws java.lang.ArrayIndexOutOfBoundsException
Returns the RoundRobinItf at the specified position in this RoundRobinContainer.
Parameters:
index - index of RoundRobinItf to return.
Returns:
RoundRobinItf

lastRoundRobin

public RoundRobinItf lastRoundRobin()
                             throws java.util.NoSuchElementException
Returns the last component of the RoundRobinContainer.
Returns:
RoundRobinItf

removeRoundRobin

public RoundRobinItf removeRoundRobin(int index)
                               throws java.lang.ArrayIndexOutOfBoundsException
Removes the RoundRobinItf at the specified position in this RoundRobinContainer.
Parameters:
index - index of RoundRobinItf to remove
Returns:
RoundRobinItf

roundRobinAt

public RoundRobinItf roundRobinAt(int index)
                           throws java.lang.ArrayIndexOutOfBoundsException
Returns the component at the specified index.
Parameters:
index - an index into this RoundRobinContainer.
Returns:
RoundRobinItf

setRoundRobin

public RoundRobinItf setRoundRobin(int index,
                                   RoundRobinItf lib)
                            throws java.lang.ArrayIndexOutOfBoundsException,
                                   java.lang.IllegalArgumentException
Replaces the RoundRobinItf at the specified position in this RoundRobinContainer with the specified RoundRobinItf.
Parameters:
index - index of RoundRobinItf to replace.
lib - RoundRobinDataBase to be stored at the specified position.
Returns:
RoundRobinItf

toRoundRobinArray

public RoundRobinItf[] toRoundRobinArray()
Returns an array containing all of the RoundRobinItf in this RoundRobinContainer in the correct order.
Returns:
RoundRobinItf

toRoundRobinArray

public RoundRobinItf[] toRoundRobinArray(RoundRobinItf[] a)
                                  throws java.lang.ArrayStoreException
Returns an array containing all of the RoundRobinItf in this RoundRobinContainer in the correct order.
Parameters:
a - the array into which the RoundRobinItf of the RoundRobinContainer are to be stored, if it is big enough; otherwise, a new array of the same runtime type is allocated for this purpose.
Returns:
RoundRobinItf

Copyright 1885-2001 FIRMENICH SA, Geneva

Submit a bug or feature
Copyright 1885-2001 FIRMENICH SA, Geneva,
All Rights Reserved.