|
IBM WebSphere Multichannel Bank Transformation Toolkit Javadoc | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ibm.btt.base.DataElement
com.ibm.btt.base.DataCollection
com.ibm.btt.base.IndexedCollection
@ATTR(value="size#Integer#IMPLIED") public class IndexedCollection
This class contains a collection of elements of the same class ordered by index.
Field Summary | |
---|---|
static java.lang.String |
defaultName
|
protected Vector |
elements
|
Fields inherited from class com.ibm.btt.base.DataElement |
---|
description, externalizer, name, parameters, state |
Constructor Summary | |
---|---|
IndexedCollection()
This is the default constructor used to create an IndexedCollection object. |
|
IndexedCollection(java.lang.String aName)
This constructor creates an IndexedCollection object with a specified name. |
Method Summary | |
---|---|
void |
addElement(DataElement aDataElement)
Adds an element at the end of the collection. |
void |
addElement(java.lang.String aName,
java.lang.Object aValue,
java.lang.String aType,
int aPosition)
|
java.lang.Object |
clone()
Returns a new IndexedCollection cloned from the current one. |
DataElement |
createElement(boolean shareDescriptor)
Returns a new DataElement to be inserted in the indexed collection that can share the same descriptors of the existing elements. |
DataElement |
createElementSharingDescriptors(DataElement sourceDataElement)
Creates a new DataElement that shares the same descriptor than the DataElement passed. |
DataElement |
getDataElement()
Gets the dataElement defined if the indexed collection size is zero. |
DataElement |
getElementAt(int anIdentifier)
Returns the element located at the index anIdentifier. |
DataElement |
getElementAt(java.lang.String anIdentifier)
Performs a recursive search of the element. |
java.util.Vector |
getElements()
Returns the value of elements. |
Tag |
getElementSubTag()
Sets the data element. |
java.util.Enumeration |
getEnumeration()
Returns the IndexedCollection's elements as an Enumeration. |
java.lang.Object |
getValue()
Returns the Indexed Collection's elements. |
java.lang.Object |
initializeFrom(Tag aTag)
Initializes an IndexedCollection with the attributes in aTag. |
void |
nestedQualifiedElements(java.util.Hashtable theTable,
java.lang.String Path)
Adds as qualified name all elements of this IndexedCollection to the Hashtable passed by parameter. |
void |
readExternal(java.io.ObjectInput s)
Invokes the object creation from an ObjectInput. |
void |
removeAll()
Removes all elements. |
DataElement |
removeElementAt(int anIndex)
Remove the element at the index marked by anIndex. |
DataElement |
removeElementAt(java.lang.String anIdentifier)
Performs a recursive search for the element. |
void |
setDataElement(DataElement aDataElement)
Sets the data element. |
void |
setElements(Vector aVector)
Sets the value of elements. |
void |
setElementSubTag(Tag aSubTag)
Sets the data element. |
void |
setValue(java.lang.Object aValue)
Validates the value to be set and if it succeeds then sets the value to the IndexedCollection from a Vector of DataElements. |
int |
size()
Returns the number of elements. |
java.lang.String |
toString()
Returns a visual representation of this data. |
Vector |
toStrings()
Returns a Vector containing a visual representation of this data. |
Vector |
toTags()
Returns a Vector with the indexed collection represented as a Tag. |
DataElement |
tryGetElementAt(int anIdentifier)
Returns the element located at the index anIdentifier. |
DataElement |
tryGetElementAt(java.lang.String anIdentifier)
Performs a recursive search of the element. |
java.lang.Object |
tryGetValueAt(java.lang.String aCompositeKey)
Returns the value of an element located in the path aCompositeKey. |
int |
trySetValueAt(java.lang.String aName,
java.lang.Object aValue)
Sets the value of an element located in the aCompositeKey path. |
java.lang.Object |
validate(java.lang.Object toValidate)
Validates the object passed (that must be an indexed collection or a vector) and if successful, the object is returned, otherwise an appropriate exception is thrown. |
void |
writeExternal(java.io.ObjectOutput s)
Provides concrete serialization handling for IndexedCollection. |
Methods inherited from class com.ibm.btt.base.DataCollection |
---|
getValueAt, nestedElements, nestedElements, nestedFields, nestedKeyedCollections, setValueAt, validate |
Methods inherited from class com.ibm.btt.base.DataElement |
---|
externalizer, getCompositeKey, getDescription, getDescriptor, getErrorInfo, getExternalizer, getKey, getName, getParameter, getParameters, getState, getTagName, isAmended, isCached, isSerializable, readExternal, readObject, removeExternal, setAmended, setCompositeKey, setDescription, setDescriptor, setErrorInfo, setExternalizer, setIsCached, setName, setParameter, setParameters, setSerializable, setState, validateObject, writeExternal |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected Vector elements
public static final java.lang.String defaultName
Constructor Detail |
---|
public IndexedCollection()
public IndexedCollection(java.lang.String aName) throws java.io.IOException
java.io.IOException
Method Detail |
---|
public void addElement(DataElement aDataElement)
aDataElement
- - The element to be addedpublic void addElement(java.lang.String aName, java.lang.Object aValue, java.lang.String aType, int aPosition) throws DSEInvalidArgumentException, java.lang.ClassNotFoundException, java.lang.InstantiationException, java.lang.IllegalAccessException
DSEInvalidArgumentException
java.lang.ClassNotFoundException
java.lang.InstantiationException
java.lang.IllegalAccessException
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
clone
in interface DSECloneable
clone
in class DataElement
java.lang.CloneNotSupportedException
- - if a problem occurs trying to clone the objectpublic DataElement createElement(boolean shareDescriptor) throws DSEInvalidRequestException
shareDescriptor
- - True if the descriptors can be shared
DSEInvalidRequestException
public DataElement createElementSharingDescriptors(DataElement sourceDataElement) throws DSEInvalidRequestException
sourceDataElement
-
DSEInvalidRequestException
public DataElement getDataElement()
public DataElement getElementAt(int anIdentifier) throws DSEObjectNotFoundException
DSEObjectNotFoundException
public DataElement getElementAt(java.lang.String anIdentifier) throws DSEObjectNotFoundException
getElementAt
in class DataElement
anIdentifier
- java.lang.String
DSEObjectNotFoundException
public java.util.Vector getElements()
public Tag getElementSubTag()
public java.util.Enumeration getEnumeration()
getEnumeration
in class DataCollection
public java.lang.Object getValue()
getValue
in class DataElement
public java.lang.Object initializeFrom(Tag aTag) throws java.io.IOException
aTag
- Externalization.Tag
java.io.IOException
public void nestedQualifiedElements(java.util.Hashtable theTable, java.lang.String Path)
nestedQualifiedElements
in class DataCollection
theTable
- java.util.HashtablePath
- String - The path where the IndexedCollection ispublic void readExternal(java.io.ObjectInput s) throws java.io.IOException, java.lang.ClassNotFoundException
readExternal
in interface java.io.Externalizable
readExternal
in class DataElement
s
- java.io.ObjectInput
java.io.IOException.
java.lang.ClassNotFoundException.
java.io.IOException
java.lang.ClassNotFoundException
public void removeAll()
public DataElement removeElementAt(int anIndex) throws DSEObjectNotFoundException
anIndex
- int
DSEObjectNotFoundException
public DataElement removeElementAt(java.lang.String anIdentifier) throws DSEObjectNotFoundException
removeElementAt
in class DataElement
anIdentifier
- java.lang.String
DSEObjectNotFoundException
public void setDataElement(DataElement aDataElement)
aDataElement
- com.ibm.btt.base.DataElementpublic void setElements(Vector aVector)
aVector
- java.util.Vectorpublic void setElementSubTag(Tag aSubTag)
public void setValue(java.lang.Object aValue) throws DSEInvalidArgumentException
setValue
in class DataCollection
aValue
- java.lang.Object - Must be a Vector of DataElements
DSEInvalidArgumentException
- - The parameter is not a Vectorpublic int size()
public java.lang.String toString()
toString
in class java.lang.Object
public Vector toStrings()
toStrings
in class DataElement
public Vector toTags() throws java.io.IOException
toTags
in class DataElement
java.io.IOException
public DataElement tryGetElementAt(int anIdentifier)
public DataElement tryGetElementAt(java.lang.String anIdentifier)
tryGetElementAt
in class DataElement
anIdentifier
- java.lang.String
public java.lang.Object tryGetValueAt(java.lang.String aCompositeKey)
aCompositeKey
- java.lang.String
public int trySetValueAt(java.lang.String aName, java.lang.Object aValue) throws DSEInvalidArgumentException
DSEInvalidArgumentException
public java.lang.Object validate(java.lang.Object toValidate) throws DSETypeException
validate
in class DataElement
DSETypeException
- - Thrown if the validation is unsuccessfulpublic void writeExternal(java.io.ObjectOutput s) throws java.io.IOException
writeExternal
in interface java.io.Externalizable
writeExternal
in class DataElement
s
- java.io.ObjectOutput
java.io.IOException
|
IBM WebSphere Multichannel Bank Transformation Toolkit Javadoc | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |