context.arch.service.helper
Class FunctionDescriptions

java.lang.Object
  |
  +--java.util.AbstractCollection
        |
        +--java.util.AbstractList
              |
              +--java.util.Vector
                    |
                    +--context.arch.service.helper.FunctionDescriptions

public class FunctionDescriptions
extends java.util.Vector

This class maintains a list of function descriptions.

See Also:
FunctionDescription, Serialized Form

Field Summary
static java.lang.String FUNCTIONS
          Tag for a widget's service functions
 
Fields inherited from class java.util.Vector
capacityIncrement, elementCount, elementData
 
Fields inherited from class java.util.AbstractList
modCount
 
Constructor Summary
FunctionDescriptions()
          Basic empty constructor
FunctionDescriptions(DataObject data)
          Constructor that takes a DataObject as a parameter.
 
Method Summary
 void addFunctionDescription(FunctionDescription function)
          Adds the given FunctionDescription object to the container.
 void addFunctionDescription(java.lang.String name, java.lang.String description, java.lang.String timing)
          Adds the given function name, description and timing to the container.
 void addFunctionDescriptions(FunctionDescriptions functions)
          Adds the given FunctionDescriptions object to the container.
 FunctionDescription getFunctionDescription(java.lang.String name)
          This method returns the FunctionDescription with the given name from this list of FunctionDescriptions.
 FunctionDescription getFunctionDescriptionAt(int index)
          Returns the FunctionDescription object at the given index
 boolean hasFunctionDescription(FunctionDescription function)
          Determines whether the given FunctionDescription object is in the container
 boolean hasFunctionDescription(java.lang.String name)
          Determines whether a function with the given name is in the container
 boolean hasFunctionDescription(java.lang.String name, java.lang.String description, java.lang.String timing)
          Determines whether the given function name and description are in the container.
 int indexOfFunctionDescription(FunctionDescription function)
          Returns the index at which the FunctionDescription object occurs
 int indexOfFunctionDescription(java.lang.String name, java.lang.String description, java.lang.String timing)
          Returns the index at which the given function name and description occurs
 int numFunctionDescriptions()
          Returns the number of FunctionDescriptions in the container return the number of FunctionDescriptions in the container
 DataObject toDataObject()
          Converts to a DataObject.
 
Methods inherited from class java.util.Vector
add, add, addAll, addAll, addElement, capacity, clear, clone, contains, containsAll, copyInto, elementAt, elements, ensureCapacity, 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, wait, wait, wait
 

Field Detail

FUNCTIONS

public static final java.lang.String FUNCTIONS
Tag for a widget's service functions
Constructor Detail

FunctionDescriptions

public FunctionDescriptions()
Basic empty constructor

FunctionDescriptions

public FunctionDescriptions(DataObject data)
Constructor that takes a DataObject as a parameter. The DataObject must contain the tag . It stores the encoded data.
Parameters:
data - DataObject that contains the function descriptions info
Method Detail

toDataObject

public DataObject toDataObject()
Converts to a DataObject.
Returns:
Services object converted to an DataObject

addFunctionDescription

public void addFunctionDescription(FunctionDescription function)
Adds the given FunctionDescription object to the container.
Parameters:
function - FunctionDescription to add

addFunctionDescription

public void addFunctionDescription(java.lang.String name,
                                   java.lang.String description,
                                   java.lang.String timing)
Adds the given function name, description and timing to the container.
Parameters:
name - Name of the function to add
description - Descripion of the function being added
timing - Timing of the function being added

addFunctionDescriptions

public void addFunctionDescriptions(FunctionDescriptions functions)
Adds the given FunctionDescriptions object to the container.
Parameters:
functions - FunctionDescriptions to add

getFunctionDescriptionAt

public FunctionDescription getFunctionDescriptionAt(int index)
Returns the FunctionDescription object at the given index
Parameters:
index - Index into the container
Returns:
FunctionDescription at the specified index

hasFunctionDescription

public boolean hasFunctionDescription(FunctionDescription function)
Determines whether the given FunctionDescription object is in the container
Parameters:
function - FunctionDescription to check
Returns:
whether function is in the container

hasFunctionDescription

public boolean hasFunctionDescription(java.lang.String name,
                                      java.lang.String description,
                                      java.lang.String timing)
Determines whether the given function name and description are in the container.
Parameters:
name - Name of the function to check
description - Description of the function to check
timing - Description of the function timing
Returns:
whether the given function name and description are in the container

hasFunctionDescription

public boolean hasFunctionDescription(java.lang.String name)
Determines whether a function with the given name is in the container
Parameters:
name - Name of the function to look for
Returns:
whether a function with the given name is in the container

indexOfFunctionDescription

public int indexOfFunctionDescription(FunctionDescription function)
Returns the index at which the FunctionDescription object occurs
Parameters:
function - FunctionDescription to look for
Returns:
index of the specified FunctionDescription

indexOfFunctionDescription

public int indexOfFunctionDescription(java.lang.String name,
                                      java.lang.String description,
                                      java.lang.String timing)
Returns the index at which the given function name and description occurs
Parameters:
name - Name of the function to look for
description - Description of the function to look for
timing - Function timing to look for

numFunctionDescriptions

public int numFunctionDescriptions()
Returns the number of FunctionDescriptions in the container return the number of FunctionDescriptions in the container

getFunctionDescription

public FunctionDescription getFunctionDescription(java.lang.String name)
This method returns the FunctionDescription with the given name from this list of FunctionDescriptions.
Parameters:
name - of the FunctionDescription to return
Returns:
FunctionDescription with the given name