exe
Class GAIGSNameValueIndex

java.lang.Object
  extended by exe.GAIGSbase
      extended by exe.GAIGSNameValueIndex
All Implemented Interfaces:
GAIGSdatastr

public class GAIGSNameValueIndex
extends GAIGSbase

Build a GAIGSNameValueindex adhering to the following DTD


Field Summary
 
Fields inherited from interface exe.GAIGSdatastr
DEFAULT_COLOR, DEFAULT_FONT_SIZE, DEFAULT_NAME, DEFAULT_X1, DEFAULT_X2, DEFAULT_Y1, DEFAULT_Y2
 
Constructor Summary
GAIGSNameValueIndex()
          Use all default rendering values
GAIGSNameValueIndex(java.lang.String name, java.lang.String color, double x1, double y1, double x2, double y2, double fontSize)
           
 
Method Summary
 boolean add(java.lang.String name, java.lang.Object v)
          Add the specified name-value pair to this name-value index.
 boolean add(java.lang.String name, java.lang.Object v, java.lang.String c)
          Add the specified name-value pair to this name-value index with the provided color.
 boolean contains(java.lang.String name)
          Returns true if this name-value index contains the specified name.
 boolean isEmpty()
          Returns true if the name-value index is empty.
 int number_items()
          Return the number of items in the name-value index.
 boolean remove(java.lang.String name)
          Removes the specified name (and corresponding value) in this name-value index.
 java.lang.String toXML()
          Creates and returns GAIGS XML code for the current state of the name-value index
 
Methods inherited from class exe.GAIGSbase
getName, setName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GAIGSNameValueIndex

public GAIGSNameValueIndex()
Use all default rendering values


GAIGSNameValueIndex

public GAIGSNameValueIndex(java.lang.String name,
                           java.lang.String color,
                           double x1,
                           double y1,
                           double x2,
                           double y2,
                           double fontSize)
Parameters:
name - Display name of this structure.
color - Color for items unless locally overridden.
x1 - Left display bound.
y1 - Bottom display bound.
x2 - Top display bound.
y2 - Right display bound.
fontSize - Font size for display.
Method Detail

add

public boolean add(java.lang.String name,
                   java.lang.Object v)
Add the specified name-value pair to this name-value index. Default color will be used for this item.

Parameters:
name - The name to be stored.
v - The value to be stored.

add

public boolean add(java.lang.String name,
                   java.lang.Object v,
                   java.lang.String c)
Add the specified name-value pair to this name-value index with the provided color.

Parameters:
name - The name to be stored.
v - The value to be stored.
c - The color to be stored.

contains

public boolean contains(java.lang.String name)
Returns true if this name-value index contains the specified name.

Parameters:
name - The name to be searched for.

isEmpty

public boolean isEmpty()
Returns true if the name-value index is empty.


remove

public boolean remove(java.lang.String name)
Removes the specified name (and corresponding value) in this name-value index. Return true if the item was found and removed.

Parameters:
name - The name to be removed.

number_items

public int number_items()
Return the number of items in the name-value index.


toXML

public java.lang.String toXML()
Creates and returns GAIGS XML code for the current state of the name-value index

Returns:
A String containing GAIGS XML code for the name-value index