Package com.documentum.fc.common
Interface IDfList
public interface IDfList
This interface provides functionality that encapsulates Vector operations.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic 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 TypeMethodDescriptionint
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
Appends an instance of an IDfId object to the list.int
appendInt
(int value) Appends an int value to the list.int
appendList
(IDfList value) Appends an instance of an IDfList object to the list.int
appendString
(String value) Appends a string value to the list.int
appendTime
(IDfTime value) Appends an instance of an IDfTime object to the list.int
appendValue
(IDfValue value) 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
findIdIndex
(IDfId value) 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
findListIndex
(IDfList value) Returns the index of the first occurrence of an IDfList object in the list.int
findStringIndex
(String value) Returns the index of the first occurrence of a string value in the list.int
findTimeIndex
(IDfTime value) Returns the index of the first occurrence of an IDfTime object in the list.int
findValueIndex
(IDfValue value) 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
getCount()
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
Inserts an Object instance into the list at a specified index.void
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
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
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
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
Adds an instance of an IDfList interface into the list at a specified index.void
Adds a string value into the list at a specified index.void
Adds an instance of an IDfTime interface into the list at a specified index.void
Adds an instance of an IDfValue interface into the list at a specified index.
-
Field Details
-
DF_BOOLEAN
static final int DF_BOOLEANRepresents the boolean datatype.- See Also:
-
DF_INTEGER
static final int DF_INTEGERRepresents the integer datatype.- See Also:
-
DF_STRING
static final int DF_STRINGRepresents the string datatype.- See Also:
-
DF_ID
static final int DF_IDRepresents the ID datatype.- See Also:
-
DF_TIME
static final int DF_TIMERepresents the time datatype.- See Also:
-
DF_DOUBLE
static final int DF_DOUBLERepresents the double datatype.- See Also:
-
DF_OBJECT
static final int DF_OBJECTRepresents any Java object.- See Also:
-
DF_VALUE
static final int DF_VALUERepresents a DfValue object.- See Also:
-
DF_LIST
static final int DF_LISTRepresents a DfList object.- See Also:
-
-
Method Details
-
append
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
Inserts all objects contained in an IDfList object into the list at a specified index. Thelist
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
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 callingsetElementType
.- 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
Returns the datatype of the items added to the list at the specified index. The datatype is set by callingsetElementType
.- 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
-