Interface IDfList


public interface IDfList
This interface provides functionality that encapsulates Vector operations.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
    Represents the boolean datatype.
    static final int
    Represents the double datatype.
    static final int
    Represents the ID datatype.
    static final int
    Represents the integer datatype.
    static final int
    Represents a DfList object.
    static final int
    Represents any Java object.
    static final int
    Represents the string datatype.
    static final int
    Represents the time datatype.
    static final int
    Represents a DfValue object.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    append(Object value)
    Appends an Object instance to the list.
    int
    appendBoolean(boolean value)
    Appends a boolean value to the list.
    int
    appendDouble(double value)
    Appends a double value to the list.
    int
    appendId(IDfId value)
    Appends an instance of an IDfId object to the list.
    int
    appendInt(int value)
    Appends an int value to the list.
    int
    Appends an instance of an IDfList object to the list.
    int
    Appends a string value to the list.
    int
    Appends an instance of an IDfTime object to the list.
    int
    Appends an instance of an IDfValue object to the list.
    int
    findBooleanIndex(boolean value)
    Returns the index of the first occurrence of a boolean value in the list.
    int
    findDoubleIndex(double value)
    Returns the index of the first occurrence of a double value in the list.
    int
    Returns the index of the first occurrence of an IDfId object in the list.
    int
    Returns the index of the first occurrence of the Object in the list.
    int
    findIntIndex(int value)
    Returns the index of the first occurrence of an int value in the list.
    int
    Returns the index of the first occurrence of an IDfList object in the list.
    int
    Returns the index of the first occurrence of a string value in the list.
    int
    Returns the index of the first occurrence of an IDfTime object in the list.
    int
    Returns the index of the first occurrence of an IDfValue object in the list.
    get(int index)
    Fetches an Object instance from the list at the specified index.
    boolean
    getBoolean(int index)
    Fetches a boolean value from the list at the specified index.
    int
    Returns the number of items in the list.
    double
    getDouble(int index)
    Fetches a double value from the list at the specified index.
    int
    Returns the datatype of the items added to the list.
    int
    getElementTypeAt(int index)
    Returns the datatype of the items added to the list at the specified index.
    getId(int index)
    Fetches an instance of an IDfId object from the list at the specified index.
    int
    getInt(int index)
    Fetches an int value from the list at the specified index.
    getList(int index)
    Fetches an instance of an IDfList object from the list at the specified index.
    getString(int index)
    Fetches a string value from the list at the specified index.
    getTime(int index)
    Fetches an instance of an IDfTime object from the list at the specified index.
    getValue(int index)
    Fetches an instance of an IDfValue object from the list at the specified index.
    void
    insert(int index, Object value)
    Inserts an Object instance into the list at a specified index.
    void
    insertAll(int index, IDfList list)
    Inserts all objects contained in an IDfList object into the list at a specified index.
    void
    insertBoolean(int index, boolean value)
    Inserts a boolean value into the list at a specified index.
    void
    insertDouble(int index, double value)
    Inserts a double value into the list at a specified index.
    void
    insertId(int index, IDfId value)
    Inserts an instance of an IDfId object into the list at a specified index.
    void
    insertInt(int index, int value)
    Inserts an int value into the list at a specified index.
    void
    insertList(int index, IDfList value)
    Inserts an instance of an IDfList object into the list at a specified index.
    void
    insertString(int index, String value)
    Inserts a string value into the list at a specified index.
    void
    insertTime(int index, IDfTime value)
    Inserts an instance of an IDfTime object into the list at a specified index.
    void
    insertValue(int index, IDfValue value)
    Inserts an instance of an IDfValue object into the list at a specified index.
    void
    remove(int index)
    Removes an item from the list at the specified index.
    void
    Removes all items from the list and set its size to zero.
    void
    set(int index, Object value)
    Adds an Object instance into the list at a specified index.
    void
    setBoolean(int index, boolean value)
    Adds a boolean value into the list at a specified index.
    void
    setDouble(int index, double value)
    Adds a double value into the list at a specified index.
    void
    setElementType(int type)
    Sets the element type for the list.
    void
    setId(int index, IDfId value)
    Adds an instance of an IDfId interface into the list at a specified index.
    void
    setInt(int index, int value)
    Adds an int value into the list at a specified index.
    void
    setList(int index, IDfList value)
    Adds an instance of an IDfList interface into the list at a specified index.
    void
    setString(int index, String value)
    Adds a string value into the list at a specified index.
    void
    setTime(int index, IDfTime value)
    Adds an instance of an IDfTime interface into the list at a specified index.
    void
    setValue(int index, IDfValue value)
    Adds an instance of an IDfValue interface into the list at a specified index.
  • Field Details

  • Method Details

    • append

      int append(Object value) throws DfException
      Appends an Object instance to the list.
      Parameters:
      value - the object instance to add to the list.
      Returns:
      the size of the list after the append.
      Throws:
      DfException - if there is a type mismatch
    • appendString

      int appendString(String value) throws DfException
      Appends a string value to the list.
      Parameters:
      value - the string value to add to the list.
      Returns:
      the size of the list after the appendString.
      Throws:
      DfException - if there is a type mismatch
    • appendInt

      int appendInt(int value) throws DfException
      Appends an int value to the list.
      Parameters:
      value - the int value to add to the list.
      Returns:
      the size of the list after the appendInt.
      Throws:
      DfException - if there is a type mismatch
    • appendDouble

      int appendDouble(double value) throws DfException
      Appends a double value to the list.
      Parameters:
      value - the double value to add to the list.
      Returns:
      the size of the list after the appendDouble.
      Throws:
      DfException - if there is a type mismatch
    • appendBoolean

      int appendBoolean(boolean value) throws DfException
      Appends a boolean value to the list.
      Parameters:
      value - the boolean value to add to the list.
      Returns:
      the size of the list after the appendBoolean.
      Throws:
      DfException - if there is a type mismatch
    • appendId

      int appendId(IDfId value) throws DfException
      Appends an instance of an IDfId object to the list.
      Parameters:
      value - the IDfId object to add to the list.
      Returns:
      the size of the list after the appendId.
      Throws:
      DfException - if there is a type mismatch
    • appendTime

      int appendTime(IDfTime value) throws DfException
      Appends an instance of an IDfTime object to the list.
      Parameters:
      value - the IDfTime object to add to the list.
      Returns:
      the size of the list after the appendTime.
      Throws:
      DfException - if there is a type mismatch
    • appendValue

      int appendValue(IDfValue value) throws DfException
      Appends an instance of an IDfValue object to the list.
      Parameters:
      value - the IDfValue object to add to the list.
      Returns:
      the size of the list after the appendValue.
      Throws:
      DfException - if there is a type mismatch
    • appendList

      int appendList(IDfList value) throws DfException
      Appends an instance of an IDfList object to the list.
      Parameters:
      value - the IDfList object to add to the list.
      Returns:
      the size of the list after the appendList.
      Throws:
      DfException - if there is a type mismatch
    • insert

      void insert(int index, Object value) throws DfException
      Inserts an Object instance into the list at a specified index.
      Parameters:
      index - the location where the object will be inserted into the list.
      value - the object instance to add to the list.
      Throws:
      DfException - if there is a type mismatch, a null pointer exception, or an index out of bounds
    • insertString

      void insertString(int index, String value) throws DfException
      Inserts a string value into the list at a specified index.
      Parameters:
      index - the location where the value will be inserted into the list.
      value - the string value to add to the list.
      Throws:
      DfException - if there is a type mismatch
    • insertInt

      void insertInt(int index, int value) throws DfException
      Inserts an int value into the list at a specified index.
      Parameters:
      index - the location where the value will be inserted into the list.
      value - the int value to add to the list.
      Throws:
      DfException - if there is a type mismatch
    • insertDouble

      void insertDouble(int index, double value) throws DfException
      Inserts a double value into the list at a specified index.
      Parameters:
      index - the location where the value will be inserted into the list.
      value - the double value to add to the list.
      Throws:
      DfException - if there is a type mismatch
    • insertBoolean

      void insertBoolean(int index, boolean value) throws DfException
      Inserts a boolean value into the list at a specified index.
      Parameters:
      index - the location where the value will be inserted into the list.
      value - the boolean value to add to the list.
      Throws:
      DfException - if there is a type mismatch
    • insertId

      void insertId(int index, IDfId value) throws DfException
      Inserts an instance of an IDfId object into the list at a specified index.
      Parameters:
      index - the location where the object will be inserted into the list.
      value - the object instance to add to the list.
      Throws:
      DfException - if there is a type mismatch
    • insertTime

      void insertTime(int index, IDfTime value) throws DfException
      Inserts an instance of an IDfTime object into the list at a specified index.
      Parameters:
      index - the location where the object will be inserted into the list.
      value - the object instance to add to the list.
      Throws:
      DfException - if there is a type mismatch
    • insertValue

      void insertValue(int index, IDfValue value) throws DfException
      Inserts an instance of an IDfValue object into the list at a specified index.
      Parameters:
      index - the location where the object will be inserted into the list.
      value - the object instance to add to the list.
      Throws:
      DfException - if there is a type mismatch
    • insertList

      void insertList(int index, IDfList value) throws DfException
      Inserts an instance of an IDfList object into the list at a specified index.
      Parameters:
      index - the location where the object will be inserted into the list.
      value - the object instance to add to the list.
      Throws:
      DfException - if there is a type mismatch
    • get

      Object get(int index) throws DfException
      Fetches an Object instance from the list at the specified index.
      Parameters:
      index - the location in the list where the Object will be fetched.
      Returns:
      an Object instance.
      Throws:
      DfException - if there is a bad index value
    • getString

      String getString(int index) throws DfException
      Fetches a string value from the list at the specified index.
      Parameters:
      index - the location in the list where the string value will be fetched.
      Returns:
      a string value.
      Throws:
      DfException - if there is a type mismatch
    • getInt

      int getInt(int index) throws DfException
      Fetches an int value from the list at the specified index.
      Parameters:
      index - the location in the list where the int value will be fetched.
      Returns:
      an int value.
      Throws:
      DfException - if there is a type mismatch
    • getDouble

      double getDouble(int index) throws DfException
      Fetches a double value from the list at the specified index.
      Parameters:
      index - the location in the list where the double value will be fetched.
      Returns:
      a double value.
      Throws:
      DfException - if there is a type mismatch
    • getBoolean

      boolean getBoolean(int index) throws DfException
      Fetches a boolean value from the list at the specified index.
      Parameters:
      index - the location in the list where the boolean value will be fetched.
      Returns:
      a boolean value.
      Throws:
      DfException - if there is a type mismatch
    • getId

      IDfId getId(int index) throws DfException
      Fetches an instance of an IDfId object from the list at the specified index.
      Parameters:
      index - the location in the list where an instance of an IDfId object will be fetched.
      Returns:
      an instance of an IDfId object.
      Throws:
      DfException - if there is a type mismatch
    • getTime

      IDfTime getTime(int index) throws DfException
      Fetches an instance of an IDfTime object from the list at the specified index.
      Parameters:
      index - the location in the list where an instance of an IDfTime object will be fetched.
      Returns:
      an instance of an IDfTime object.
      Throws:
      DfException - if there is a type mismatch
    • getValue

      IDfValue getValue(int index) throws DfException
      Fetches an instance of an IDfValue object from the list at the specified index.
      Parameters:
      index - the location in the list where an instance of an IDfValue object will be fetched.
      Returns:
      an instance of an IDfValue object.
      Throws:
      DfException - if there is a type mismatch
    • getList

      IDfList getList(int index) throws DfException
      Fetches an instance of an IDfList object from the list at the specified index.
      Parameters:
      index - the location in the list where an instance of an IDfList object will be fetched.
      Returns:
      an instance of an IDfList object.
      Throws:
      DfException - if there is a type mismatch
    • set

      void set(int index, Object value) throws DfException
      Adds an Object instance into the list at a specified index. The previous Object at that position is discarded.
      Parameters:
      index - the location where the object will be added to the list.
      value - the object instance to add to the list.
      Throws:
      DfException - if there is a type mismatch, a null value, or a bad index
    • setString

      void setString(int index, String value) throws DfException
      Adds a string value into the list at a specified index. The previous value at that position is discarded.
      Parameters:
      index - the location where the value will be added to the list.
      value - the string value to add to the list.
      Throws:
      DfException - if there is a type mismatch
    • setInt

      void setInt(int index, int value) throws DfException
      Adds an int value into the list at a specified index. The previous value at that position is discarded.
      Parameters:
      index - the location where the value will be added to the list.
      value - the int value to add to the list.
      Throws:
      DfException - if there is a type mismatch
    • setDouble

      void setDouble(int index, double value) throws DfException
      Adds a double value into the list at a specified index. The previous value at that position is discarded.
      Parameters:
      index - the location where the value will be added to the list.
      value - the double value to add to the list.
      Throws:
      DfException - if there is a type mismatch
    • setBoolean

      void setBoolean(int index, boolean value) throws DfException
      Adds a boolean value into the list at a specified index. The previous value at that position is discarded.
      Parameters:
      index - the location where the value will be added to the list.
      value - the boolean value to add to the list.
      Throws:
      DfException - if there is a type mismatch
    • setId

      void setId(int index, IDfId value) throws DfException
      Adds an instance of an IDfId interface into the list at a specified index. The previous object at that position is discarded.
      Parameters:
      index - the location where the object will be added to the list.
      value - the object instance to add to the list.
      Throws:
      DfException - if there is a type mismatch
    • setTime

      void setTime(int index, IDfTime value) throws DfException
      Adds an instance of an IDfTime interface into the list at a specified index. The previous object at that position is discarded.
      Parameters:
      index - the location where the object will be added to the list.
      value - the object instance to add to the list.
      Throws:
      DfException - if there is a type mismatch
    • setValue

      void setValue(int index, IDfValue value) throws DfException
      Adds an instance of an IDfValue interface into the list at a specified index. The previous object at that position is discarded.
      Parameters:
      index - the location where the object will be added to the list.
      value - the object instance to add to the list.
      Throws:
      DfException - if there is a type mismatch
    • setList

      void setList(int index, IDfList value) throws DfException
      Adds an instance of an IDfList interface into the list at a specified index. The previous object at that position is discarded.
      Parameters:
      index - the location where the object will be added to the list.
      value - the object instance to add to the list.
      Throws:
      DfException - if there is a type mismatch
    • findIndex

      int findIndex(Object value) throws DfException
      Returns the index of the first occurrence of the Object in the list.
      Parameters:
      value - the object to search for in the list.
      Returns:
      the index of the first occurrence of the Object, or -1 if it is not found.
      Throws:
      DfException - if an unexpected error occurs
    • findStringIndex

      int findStringIndex(String value) throws DfException
      Returns the index of the first occurrence of a string value in the list.
      Parameters:
      value - the string value to search for in the list.
      Returns:
      the index of the first occurrence of the string value, or -1 if it is not found.
      Throws:
      DfException - if an unexpected error occurs
    • findIntIndex

      int findIntIndex(int value) throws DfException
      Returns the index of the first occurrence of an int value in the list.
      Parameters:
      value - the int value to search for in the list.
      Returns:
      the index of the first occurrence of the int value, or -1 if it is not found.
      Throws:
      DfException - if an unexpected error occurs
    • findDoubleIndex

      int findDoubleIndex(double value) throws DfException
      Returns the index of the first occurrence of a double value in the list.
      Parameters:
      value - the double value to search for in the list.
      Returns:
      the index of the first occurrence of the double value, or -1 if it is not found.
      Throws:
      DfException - if an unexpected error occurs
    • findBooleanIndex

      int findBooleanIndex(boolean value) throws DfException
      Returns the index of the first occurrence of a boolean value in the list.
      Parameters:
      value - the boolean value to search for in the list.
      Returns:
      the index of the first occurrence of the boolean value, or -1 if it is not found.
      Throws:
      DfException - if an unexpected error occurs
    • findIdIndex

      int findIdIndex(IDfId value) throws DfException
      Returns the index of the first occurrence of an IDfId object in the list.
      Parameters:
      value - the IDfId object to search for in the list.
      Returns:
      the index of the first occurrence of the IDfId object, or -1 if it is not found.
      Throws:
      DfException - if an unexpected error occurs
    • findTimeIndex

      int findTimeIndex(IDfTime value) throws DfException
      Returns the index of the first occurrence of an IDfTime object in the list.
      Parameters:
      value - the IDfTime object to search for in the list.
      Returns:
      the index of the first occurrence of the IDfTime object, or -1 if it is not found.
      Throws:
      DfException - if an unexpected error occurs
    • findValueIndex

      int findValueIndex(IDfValue value) throws DfException
      Returns the index of the first occurrence of an IDfValue object in the list.
      Parameters:
      value - the IDfValue object to search for in the list.
      Returns:
      the index of the first occurrence of the IDfValue object, or -1 if it is not found.
      Throws:
      DfException - if an unexpected error occurs
    • findListIndex

      int findListIndex(IDfList value) throws DfException
      Returns the index of the first occurrence of an IDfList object in the list.
      Parameters:
      value - the IDfList object to search for in the list.
      Returns:
      the index of the first occurrence of the IDfList object, or -1 if it is not found.
      Throws:
      DfException - if an unexpected error occurs
    • insertAll

      void insertAll(int index, IDfList list) throws DfException
      Inserts all objects contained in an IDfList object into the list at a specified index. The list parameter must contain objects of type Object (or subtypes of Object), otherwise an exception will be thrown.
      Parameters:
      index - the location where the object will be added to the list.
      list - an IDfList object containing objects of type Object (or subtypes of Object).
      Throws:
      DfException - if there is a type mismatch
    • remove

      void remove(int index) throws DfException
      Removes an item from the list at the specified index.
      Parameters:
      index - the location where the item will be removed.
      Throws:
      DfException - if there is a bad index
    • removeAll

      void removeAll()
      Removes all items from the list and set its size to zero.
    • getCount

      int getCount()
      Returns the number of items in the list.
      Returns:
      the number of items in the list.
    • getElementType

      int getElementType()
      Returns the datatype of the items added to the list. The datatype is set by calling setElementType.
      Returns:
      the datatype of the items in the list. The valid values are DF_BOOLEAN, DF_INTEGER, DF_STRING, DF_ID, DF_TIME, DF_DOUBLE, DF_OBJECT, DF_VALUE, and DF_LIST.
    • setElementType

      void setElementType(int type)
      Sets the element type for the list. If the type is different from the list's current element type, the list will be cleared.

      The following code example demonstrates how to set the list element type and add a value: a DQL query:


       IDfList listObj = new DfList();
       listObj.setElementType(IDfList.DF_STRING);
       listObj.appendString("strVal");
       

      Parameters:
      type - the datatype of the items in the list. The valid values are DF_BOOLEAN, DF_INTEGER, DF_STRING, DF_ID, DF_TIME, DF_DOUBLE, DF_OBJECT, DF_VALUE, and DF_LIST (ie a list of lists).
    • getElementTypeAt

      int getElementTypeAt(int index) throws DfException
      Returns the datatype of the items added to the list at the specified index. The datatype is set by calling setElementType.
      Parameters:
      index - the location where the datatype will be looked up.
      Returns:
      the datatype of the items in the list. The valid values are DF_BOOLEAN, DF_INTEGER, DF_STRING, DF_ID, DF_TIME, DF_DOUBLE, DF_OBJECT, DF_VALUE, and DF_LIST.
      Throws:
      DfException - if there is an unexpected error