|
|||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--giden.GRDS.IndexArray
Copyright (c) 1993-2004 C. R. Coullard, D. S. Dilworth, J. H. Owen,
All Rights Reserved.
We make no representations or warranties about the suitability of
the software, either express or implied, including but not limited
to the implied warranties of merchantability, fitness for a
particular purpose, or non-infringement. We shall not be liable for
any damages suffered by user as a result of using, modifying or
distributing this software or its derivatives.
IndexArray is a base class that is inherited by the NodeArray and EdgeArray classes. An IndexArray stores and retrieves information using an object of type Index (e.g. Node and Edge). The length of the array is automatically resized to accomodate accesses that are beyond the size of the current array. The resizing involves creating a new array of a larger size, copying the contents of the old array to the new array, and then discarding the old array. Aside from time to resize the array, the resizing is transparent to the application.
Any type of Java Object can be stored in an IndexArray (including Node and Edge objects). A method is also provided to convert variables of type "int" into an object of type "Integer", and then store it in the IndexArray (methods for other types of non-objects may be added in the future).
Any type of supported variable can be stored using the overloaded Put method. Objects can be retrieved using the Get method and then casted to the appropriate type. Several methods are provided to perform this retrieve and cast operation (GetInt, GetNode, GetEdge).
Copyright (c) 1993-2003 C. R. Coullard, D. S. Dilworth, J. H. Owen, All Rights Reserved.
EdgeArray
,
Index
,
Network
,
NodeArray
, Serialized FormField Summary | |
static int |
ANY_TYPE
Superset of all data types |
static int |
DOUBLE_TYPE
Double data type for IndexArray |
static int |
EDGE_TYPE
Edge data type for IndexArray |
java.lang.Object |
FillObject
internal data member |
int |
FillType
internal data member |
static int |
FLOAT_TYPE
Float data type for IndexArray |
static int |
INTEGER_TYPE
Integer data type for IndexArray |
static int |
NODE_TYPE
Node data type for IndexArray |
static int |
STRING_TYPE
String data type for IndexArray |
Constructor Summary | |
IndexArray(int size,
java.lang.String name)
Creates an IndexArray with the given initial size and name and initializes the array components to null. |
Method Summary | |
void |
Fill(double value)
Fills this array with the given double value |
void |
Fill(int value)
Fills this array with the given integer value |
void |
Fill(java.lang.Object obj)
Fills this array with the given Object |
java.lang.String |
GetAlias()
Gets the alias String name of this array. |
double |
GetDouble(Index indexobject)
Gets the double using the given Index object |
Edge |
GetEdge(Index indexobject)
Gets the Edge using the given indexobject |
int |
GetInt(Index indexobject)
Gets the integer using the given Index object |
java.lang.String |
GetName()
Gets the String name of this array |
Node |
GetNode(Index indexobject)
Gets the Node using the given Indexo bject |
java.lang.Object |
GetObj(Index indexobject)
Gets the Object using the given Index object |
int |
GetSize()
Gets the current size of this array |
java.lang.String |
GetString(Index indexobject)
Gets the string using the given Index object |
giden.CORE.UiEdge |
GetUiEdge(Index indexobject)
Gets the "DrawEdge" using the given indexobject |
giden.CORE.UiIndexArray |
GetUiIndexArray()
internal method |
giden.CORE.UiNode |
GetUiNode(Index indexobject)
Gets the "DrawNode" using the given indexobject |
boolean |
PutAlias(java.lang.String alias)
Puts the alias String name for this array. |
void |
PutObj(Index indexobject,
double value)
Puts the double using the given Index object |
void |
PutObj(Index indexobject,
int value)
Puts the integer using the given Index object |
void |
PutObj(Index indexobject,
java.lang.Object obj)
Puts the Object using the given Index object |
void |
PutUiIndexArray(giden.CORE.UiIndexArray uiarray)
internal method |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int INTEGER_TYPE
public static final int FLOAT_TYPE
public static final int DOUBLE_TYPE
public static final int STRING_TYPE
public static final int NODE_TYPE
public static final int EDGE_TYPE
public static final int ANY_TYPE
public java.lang.Object FillObject
public int FillType
Constructor Detail |
public IndexArray(int size, java.lang.String name)
size
- Initial size of the arrayname
- Name of the arrayMethod Detail |
public giden.CORE.UiIndexArray GetUiIndexArray()
public void PutUiIndexArray(giden.CORE.UiIndexArray uiarray)
public java.lang.String GetName()
public java.lang.String GetAlias()
public boolean PutAlias(java.lang.String alias)
public int GetSize()
public void Fill(int value)
value
- The integer value to fill the array withpublic void Fill(double value)
value
- The double value to fill the array withpublic void Fill(java.lang.Object obj)
obj
- The Object to fill the array withpublic java.lang.Object GetObj(Index indexobject)
indexobject
- The Index object for this arraypublic void PutObj(Index indexobject, java.lang.Object obj)
indexobject
- The Index object for this arrayobj
- The Object to store in the arraypublic void PutObj(Index indexobject, int value)
indexobject
- The object containing an array indexvalue
- The integer value to store in this arraypublic void PutObj(Index indexobject, double value)
indexobject
- The object containing an array indexvalue
- The double value to store in this arraypublic int GetInt(Index indexobject)
indexobject
- The object containing an array indexpublic double GetDouble(Index indexobject)
indexobject
- The object containing an array indexpublic java.lang.String GetString(Index indexobject)
indexobject
- The object containing an array indexpublic Node GetNode(Index indexobject)
indexobject
- The object containing an array indexpublic Edge GetEdge(Index indexobject)
indexobject
- The object containing an array indexpublic giden.CORE.UiNode GetUiNode(Index indexobject)
indexobject
- The object containing an array indexpublic giden.CORE.UiEdge GetUiEdge(Index indexobject)
indexobject
- The object containing an array index
|
|||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |