rrdService.util
Class GraphicObjectContainer

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

public class GraphicObjectContainer
extends java.util.Vector

The class GraphicObjectContainer allows to stock a list of GraphicObject

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

Fields inherited from class java.util.Vector
capacityIncrement, elementCount, elementData, serialVersionUID
 
Fields inherited from class java.util.AbstractList
modCount
 
Constructor Summary
GraphicObjectContainer()
          Constructs an empty GraphicObjectContainer so that its internal data array has size 10 and its standard capacity increment is zero.
GraphicObjectContainer(java.util.Collection c)
          Constructs a GraphicObjectContainer containing the GraphicObject of the specified collection, in the order they are returned by the collection's iterator.
GraphicObjectContainer(int initialCapacity)
          Constructs an empty GraphicObjectContainer with the specified initial capacity and with its capacity increment equal to zero. param initialCapacity the initial capacity of the GraphicObjectContainer.
GraphicObjectContainer(int initialCapacity, int capacityIncrement)
          Constructs an empty GraphicObjectContainer with the specified initial capacity and capacity increment.
 
Method Summary
 GraphicObjectContainer cloneGraphicObjectContainer()
          Returns a clone of this GraphicObjectContainer. return GraphicObjectContainer
 GraphicObject firstGraphicObject()
          Returns the first component (the item at index 0) of this GraphicObjectContainer.
 GraphicObject getGraphicObject(int index)
          Returns the GraphicObject at the specified position in this GraphicObjectContainer.
 GraphicObject graphicObjectAt(int index)
          Returns the component at the specified index.
 GraphicObject lastGraphicObject()
          Returns the last component of the GraphicObjectContainer.
 GraphicObject removeGraphicObject(int index)
          Removes the GraphicObject at the specified position in this GraphicObjectContainer.
 GraphicObject setGraphicObject(int index, GraphicObject graphicObject)
          Replaces the GraphicObject at the specified position in this GraphicObjectContainer with the specified GraphicObject.
 GraphicObject[] toDataArray(GraphicObject[] a)
          Returns an array containing all of the GraphicObject in this GraphicObjectContainer in the correct order.
 GraphicObject[] toGraphicObjectArray()
          Returns an array containing all of the GraphicObject in this GraphicObjectContainer in the correct order.
 java.lang.String toString()
          Returns a string representation of a commentContainer
 
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, 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

GraphicObjectContainer

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

GraphicObjectContainer

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

GraphicObjectContainer

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

GraphicObjectContainer

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

cloneGraphicObjectContainer

public GraphicObjectContainer cloneGraphicObjectContainer()
Returns a clone of this GraphicObjectContainer. return GraphicObjectContainer

firstGraphicObject

public GraphicObject firstGraphicObject()
                                 throws java.util.NoSuchElementException
Returns the first component (the item at index 0) of this GraphicObjectContainer.
Returns:
GraphicObject

getGraphicObject

public GraphicObject getGraphicObject(int index)
                               throws java.lang.ArrayIndexOutOfBoundsException
Returns the GraphicObject at the specified position in this GraphicObjectContainer.
Parameters:
index - index of GraphicObject to return.
Returns:
GraphicObject

graphicObjectAt

public GraphicObject graphicObjectAt(int index)
                              throws java.lang.ArrayIndexOutOfBoundsException
Returns the component at the specified index.
Parameters:
index - an index into this GraphicObjectContainer.
Returns:
GraphicObject

lastGraphicObject

public GraphicObject lastGraphicObject()
                                throws java.util.NoSuchElementException
Returns the last component of the GraphicObjectContainer.
Returns:
GraphicObject

removeGraphicObject

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

setGraphicObject

public GraphicObject setGraphicObject(int index,
                                      GraphicObject graphicObject)
                               throws java.lang.ArrayIndexOutOfBoundsException,
                                      java.lang.IllegalArgumentException
Replaces the GraphicObject at the specified position in this GraphicObjectContainer with the specified GraphicObject.
Parameters:
index - index of GraphicObject to replace.
graphicObject - the graphicObject to be stored at the specified position.
Returns:
GraphicObject

toDataArray

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

toGraphicObjectArray

public GraphicObject[] toGraphicObjectArray()
Returns an array containing all of the GraphicObject in this GraphicObjectContainer in the correct order.
Returns:
GraphicObject

toString

public java.lang.String toString()
Returns a string representation of a commentContainer
Overrides:
toString in class java.util.Vector

Copyright 1885-2001 FIRMENICH SA, Geneva

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