rrdService.util
Class Template

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

public class Template
extends java.util.Vector

The class Template allows to stock a list of dsname

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

Fields inherited from class java.util.Vector
capacityIncrement, elementCount, elementData, serialVersionUID
 
Fields inherited from class java.util.AbstractList
modCount
 
Constructor Summary
Template()
          Constructs an empty Template so that its internal data array has size 10 and its standard capacity increment is zero.
Template(java.util.Collection c)
          Constructs a Template containing the ds-name of the specified collection, in the order they are returned by the collection's iterator.
Template(int initialCapacity)
          Constructs an empty Template with the specified initial capacity and with its capacity increment equal to zero. param initialCapacity the initial capacity of the Template.
Template(int initialCapacity, int capacityIncrement)
          Constructs an empty Template with the specified initial capacity and capacity increment.
 
Method Summary
 Template cloneTemplate()
          Returns a clone of this Template. return Template
 java.lang.String dsNameAt(int index)
          Returns the component at the specified index.
 java.lang.String firstDsName()
          Returns the first component (the item at index 0) of this Template.
 java.lang.String getDsName(int index)
          Returns the ds-name at the specified position in this Template.
 java.lang.String lastDsName()
          Returns the last component of the Template.
 java.lang.String removeDsName(int index)
          Removes the ds-name at the specified position in this Template.
 java.lang.String setDsName(int index, java.lang.String dsName)
          Replaces the ds-name at the specified position in this Template with the specified ds-name.
 java.lang.String toString()
          toString return a string representation of this template
 java.lang.String[] toTempaleArray()
          Returns an array containing all of the ds-name in this Template in the correct order.
 java.lang.String[] toTemplateArray(java.lang.String[] a)
          Returns an array containing all of the ds-name in this Template 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, 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

Template

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

Template

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

Template

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

Template

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

cloneTemplate

public Template cloneTemplate()
Returns a clone of this Template. return Template

dsNameAt

public java.lang.String dsNameAt(int index)
                          throws java.lang.ArrayIndexOutOfBoundsException
Returns the component at the specified index.
Parameters:
index - an index into this Template.
Returns:
ds-name

firstDsName

public java.lang.String firstDsName()
                             throws java.util.NoSuchElementException
Returns the first component (the item at index 0) of this Template.
Returns:
ds-name

getDsName

public java.lang.String getDsName(int index)
                           throws java.lang.ArrayIndexOutOfBoundsException
Returns the ds-name at the specified position in this Template.
Parameters:
index - index of ds-name to return.
Returns:
ds-name

lastDsName

public java.lang.String lastDsName()
                            throws java.util.NoSuchElementException
Returns the last component of the Template.
Returns:
ds-name

removeDsName

public java.lang.String removeDsName(int index)
                              throws java.lang.ArrayIndexOutOfBoundsException
Removes the ds-name at the specified position in this Template.
Parameters:
index - index of ds-name to remove
Returns:
ds-name

setDsName

public java.lang.String setDsName(int index,
                                  java.lang.String dsName)
                           throws java.lang.ArrayIndexOutOfBoundsException,
                                  java.lang.IllegalArgumentException
Replaces the ds-name at the specified position in this Template with the specified ds-name.
Parameters:
index - index of ds-name to replace.
dsName - RoundRobinDataBase to be stored at the specified position.
Returns:
ds-name

toString

public java.lang.String toString()
toString return a string representation of this template
Overrides:
toString in class java.util.Vector

toTempaleArray

public java.lang.String[] toTempaleArray()
Returns an array containing all of the ds-name in this Template in the correct order.
Returns:
ds-name

toTemplateArray

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

Copyright 1885-2001 FIRMENICH SA, Geneva

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