com.tibco.cep.runtime.model.element

## Interface PropertyArray

- All Superinterfaces:
    Property
  All Known Subinterfaces:
    PropertyArrayBoolean, PropertyArrayConcept, PropertyArrayConceptReference, PropertyArrayContainedConcept, PropertyArrayDateTime, PropertyArrayDouble, PropertyArrayInt, PropertyArrayLong, PropertyArrayString

      public interface PropertyArray
      extends Property

  Base for array properties, (properties that can contain multiple `PropertyAtom`).
  Since:
    2.0.0

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from interface com.tibco.cep.runtime.model.element.Property

      `Property.PropertyBoolean, Property.PropertyConcept, Property.PropertyConceptReference, Property.PropertyContainedConcept, Property.PropertyDateTime, Property.PropertyDouble, Property.PropertyInt, Property.PropertyLong, Property.PropertyString`

  - ### Field Summary

    - ### Fields inherited from interface com.tibco.cep.runtime.model.element.Property

      `HISTORY_POLICY_ALL_VALUES, HISTORY_POLICY_CHANGES_ONLY`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `PropertyAtom` | `add()` Creates a `PropertyAtom` without setting a value and appends it to the end of the array.
    `void` | `add(int index, java.lang.Object value)` Creates a `PropertyAtom` with the given value, and inserts it at the specified position in the array.
    `int` | `add(java.lang.Object value)` Creates a `PropertyAtom` with the given value, and appends it to the end of the array.
    `void` | `clear()` Removes all the elements from this list.
    `PropertyAtom` | `get(int index)` Returns the `PropertyAtom` at the specified position in the array.
    `java.lang.String` | `getString()` Gets a `String` representation of the current value of this `PropertyArray`.
    `int` | `length()` Returns the length of this array.
    `PropertyAtom` | `remove(int index)` Removes the `PropertyAtom` at the specified position in this list.
    `PropertyAtom[]` | `toArray()` Returns an array containing all of the elements in this `PropertyArray` in the correct order.
    `PropertyAtom[]` | `toArray(PropertyAtom[] array)` Returns an array containing all of the elements in this `PropertyArray` in the correct order, and whose runtime type is that of the specified array.

    - ### Methods inherited from interface com.tibco.cep.runtime.model.element.Property

      `getHistoryPolicy, getHistorySize, getName, getParent`

- - ### Method Detail

    - #### length

          int length()

      Returns the length of this array.
      Returns:
        the length of this array.
      Since:
        2.0.0

    - #### clear

          void clear()

      Removes all the elements from this list. The list will be empty after this call returns.
      Since:
        2.0.0

    - #### add

          int add(java.lang.Object value)

      Creates a `PropertyAtom` with the given value, and appends it to the end of the array. This method does not check for duplicates (i.e. existence of the same value in the array).
      Parameters:
        `value` - the object to create the new `PropertyAtom` with.
      Returns:
        the index at which the `PropertyAtom` was inserted.
      Since:
        2.0.0

    - #### add

          void add(int index,
                   java.lang.Object value)

      Creates a `PropertyAtom` with the given value, and inserts it at the specified position in the array. Shifts the element currently at that position (if any) and any subsequent elements to the right (i.e. adds one to their indices).
      Parameters:
        `index` - the index at which the specified element is to be inserted.
        `value` - the value of the property atom to insert.
      Throws:
        `java.lang.IndexOutOfBoundsException` - if the index is invalid.
      Since:
        2.0.0

    - #### remove

          PropertyAtom remove(int index)

      Removes the `PropertyAtom` at the specified position in this list. Shifts any subsequent elements to the left (i.e. subtracts one from their indices).
      Parameters:
        `index` - the index of the element to remove.
      Returns:
        the element that was removed from the list.
      Throws:
        `java.lang.IndexOutOfBoundsException` - if index was invalid.
      Since:
        2.0.0

    - #### get

          PropertyAtom get(int index)

      Returns the `PropertyAtom` at the specified position in the array.
      Parameters:
        `index` - the index of the `PropertyAtom` to return.
      Returns:
        the element at the specified position in this array.
      Throws:
        `java.lang.IndexOutOfBoundsException` - if the index is invalid.
      Since:
        2.0.0

    - #### toArray

          PropertyAtom[] toArray()

      Returns an array containing all of the elements in this `PropertyArray` in the correct order.
      Returns:
        an array containing all of the elements in this `PropertyArray` in the correct order.
      Since:
        2.0.0

    - #### getString

          java.lang.String getString()

      Gets a `String` representation of the current value of this `PropertyArray`.
      Since:
        2.0.0

    - #### toArray

          PropertyAtom[] toArray(PropertyAtom[] array)

      Returns an array containing all of the elements in this `PropertyArray` in the correct order, and whose runtime type is that of the specified array.

      If the result fits in the specified array, it is returned therein. Otherwise, a new array is allocated with the runtime type of the specified array and the size of this `PropertyArray`.

      If the list fits in the specified array with room to spare (i.e. if the array has more elements than the list), the element in the array immediately following the end of the collection are set to null. This is useful in determining the length of the list only if the caller knows that the list does not contain any null element.

      Parameters:
        `array` - the array into which the elements of the list are to be stored, if it is big enough; otherwise, a new array of the same runtime type will be allocated for this purpose.
      Returns:
        an array containing the elements of this `PropertyArray`.
      Throws:
        `java.lang.ArrayStoreException` - - if the runtime type of a is not a supertype of the runtime type of every element in this list.
      Since:
        2.0.0

    - #### add

          PropertyAtom add()

      Creates a `PropertyAtom` without setting a value and appends it to the end of the array.
      Returns:
        the `PropertyAtom` element that was added.
      Since:
        2.0.0