Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## context.arch.storage
Class Conditions

    java.lang.Object
      |
      +--java.util.AbstractCollection
            |
            +--java.util.AbstractList
                  |
                  +--java.util.Vector
                        |
                        +--context.arch.storage.Conditions

public class Conditions
extends java.util.Vector

This class is a container for a group of related Condition objects. Condition objects can be added and found in the container.

See Also:
  Serialized Form

Field Summary
`static java.lang.String` | `CONDITIONS` Tag for conditions

Fields inherited from class java.util.Vector
`capacityIncrement, elementCount, elementData`

Fields inherited from class java.util.AbstractList
`modCount`

Constructor Summary
`Conditions()` Empty constructor
`Conditions(DataObject data)` Constructor that takes a DataObject as a parameter.

Method Summary
`void` | `addCondition(Condition cond)` Adds the given Condition object to the container.
`void` | `addCondition(java.lang.String attribute, int compare, java.lang.Object value)` Adds the given attribute name, comparison and comparison value to the container.
`Condition` | `getConditionAt(int index)` Returns the Condition object at the given index
`boolean` | `hasCondition(Condition cond)` Determines whether the given Condition object is in the container
`boolean` | `hasCondition(java.lang.String attribute, int compare, java.lang.Object value)` Determines whether the given attribute name and value are in the container, using the default datatype.
`int` | `indexOfCondition(Condition cond)` Returns the index at which the Condition object occurs
`int` | `indexOfCondition(java.lang.String name, int compare, java.lang.Object value)` Returns the index at which the given Condition attribute name, comparison and value occurs.
`int` | `numConditions()` Returns the number of Condition objects in the container return the number of Condition objects in the container
`DataObject` | `toDataObject()` Converts the Condition objects 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

### CONDITIONS

    public static final java.lang.String CONDITIONS

  Tag for conditions

Constructor Detail

### Conditions

    public Conditions()

  Empty constructor

### Conditions

    public Conditions(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 condition info for retrieval

Method Detail

### toDataObject

    public DataObject toDataObject()

  Converts the Condition objects to a DataObject
  Returns:
    Conditions object converted to a DataObject

### addCondition

    public void addCondition(Condition cond)

  Adds the given Condition object to the container.
  Parameters:
    `cond` - Condition to add

### addCondition

    public void addCondition(java.lang.String attribute,
                             int compare,
                             java.lang.Object value)

  Adds the given attribute name, comparison and comparison value to the container.
  Parameters:
    `attribute` - Name of the attribute to add
    `compare` - Comparison to use
    `value` - Value for comparison

### getConditionAt

    public Condition getConditionAt(int index)

  Returns the Condition object at the given index
  Parameters:
    `index` - Index into the container
  Returns:
    Condition at the specified index

### hasCondition

    public boolean hasCondition(Condition cond)

  Determines whether the given Condition object is in the container
  Parameters:
    `cond` - Condition to check
  Returns:
    whether Condition is in the container

### hasCondition

    public boolean hasCondition(java.lang.String attribute,
                                int compare,
                                java.lang.Object value)

  Determines whether the given attribute name and value are in the container, using the default datatype.
  Parameters:
    `attribute` - Name of the attribute to check
    `compare` - Comparison to check
    `value` - Comparison value of the attribute to check
  Returns:
    whether the given Condition name, comparison, and value are in the container

### indexOfCondition

    public int indexOfCondition(Condition cond)

  Returns the index at which the Condition object occurs
  Parameters:
    `att` - Condition to look for
  Returns:
    index of the specified Condition

### indexOfCondition

    public int indexOfCondition(java.lang.String name,
                                int compare,
                                java.lang.Object value)

  Returns the index at which the given Condition attribute name, comparison and value occurs.
  Parameters:
    `attribute` - Name of the attribute to look for
    `compare` - Comparison to look for
    `value` - Comparison value to look for
  Returns:
    index of the specified Condition

### numConditions

    public int numConditions()

  Returns the number of Condition objects in the container return the number of Condition objects in the container

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD