Class EDU.auburn.VGJ.graph.GMLobject
All Packages Class Hierarchy This Package Previous Next Index
Class EDU.auburn.VGJ.graph.GMLobject
java.lang.Object
|
+----EDU.auburn.VGJ.graph.GMLobject
- public class GMLobject
- extends Object
A GML object that does nothing but create itself and write itself.
Here is the source.
-
GMLfile
-
-
GMLinteger
-
-
GMLlist
-
-
GMLreal
-
-
GMLstring
-
-
GMLundefined
-
-
key_
-
-
next_
-
-
type_
-
-
value_
-
-
GMLobject()
-
-
GMLobject(GMLlexer, String)
- Create the object from a GMLlexer and key.
-
GMLobject(String, int)
-
-
addObject(GMLobject)
-
-
addObjectToEnd(GMLobject)
-
-
deleteAll(String, int)
-
-
deleteUnsafe()
-
-
getGMLSubObject(String, int, boolean)
- Get the first sub-object with path-key "path" and type "type",
or null if no such object exists.
-
getNextGMLSubObject()
- Iterator initialized by getGMLSubObject().
-
getValue(String, int)
- Get the value of the first sub object matching the path-key "path"
and type "type", or null if there is no sub object.
-
prune()
- Remove all null GMLlists from the object tree.
-
setHashFromGML(String, int, Hashtable)
- Insert the keys and values of the first sub-object with path-key
"path" and type "type", into the hash table "hash".
-
setValue(String, int, Object)
-
-
toString(int)
- Print the text representation of the object tree, with "numtabs"
leading tabs.
GMLinteger
public final static int GMLinteger
GMLreal
public final static int GMLreal
GMLstring
public final static int GMLstring
GMLlist
public final static int GMLlist
GMLundefined
public final static int GMLundefined
GMLfile
public final static int GMLfile
key_
protected String key_
value_
protected Object value_
next_
protected GMLobject next_
type_
protected int type_
GMLobject
public GMLobject()
GMLobject
public GMLobject(String key,
int type)
GMLobject
public GMLobject(GMLlexer lexer,
String key) throws IOException, ParseError
- Create the object from a GMLlexer and key. A null key will cause
a GMLfile object to be created.
toString
public String toString(int numtabs)
- Print the text representation of the object tree, with "numtabs"
leading tabs.
getNextGMLSubObject
public GMLobject getNextGMLSubObject()
- Iterator initialized by getGMLSubObject().
Returns the next sub-object matching the path-key and type specified
in a previous call to getGMLSubObject(), or null if no such object
exists.
getGMLSubObject
public GMLobject getGMLSubObject(String path,
int type,
boolean create)
- Get the first sub-object with path-key "path" and type "type",
or null if no such object exists.
If "create" is true, create the sub-object if it doesn't exist.
If type is GMLreal and a matching GMLinteger is found, the integer
object will be changed to a real.
This function begins an iteration sequence that can continue
with calls to getNextGMLSubObject().
setHashFromGML
public void setHashFromGML(String path,
int type,
Hashtable hash)
- Insert the keys and values of the first sub-object with path-key
"path" and type "type", into the hash table "hash".
If type is GMLreal and a matching GMLinteger is found, the integer
object will be changed to a real.
getValue
public Object getValue(String path,
int type)
- Get the value of the first sub object matching the path-key "path"
and type "type", or null if there is no sub object.
setValue
public void setValue(String path,
int type,
Object value)
addObject
public void addObject(GMLobject object)
addObjectToEnd
public void addObjectToEnd(GMLobject object)
deleteUnsafe
public void deleteUnsafe()
deleteAll
public void deleteAll(String key,
int type)
prune
public void prune()
- Remove all null GMLlists from the object tree.
All Packages Class Hierarchy This Package Previous Next Index