exe
Class GAIGShashStruct

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

public class GAIGShashStruct
extends GAIGSbase

Build a GAIGShashStruct 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
GAIGShashStruct(int size)
          Use all default rendering values
GAIGShashStruct(java.lang.String name, java.lang.String color, double x1, double y1, double x2, double y2, double fontSize, int size)
           
GAIGShashStruct(java.lang.String name, java.lang.String hash_struct_root_color, double x1, double y1, double x2, double y2, double fontSize, int size, java.lang.String[] hash_struct_list_colors)
           
 
Method Summary
 boolean add(int index, java.lang.Object v)
          Inserts the specified element at the specified position in this hash table.
 boolean add(int index, java.lang.Object v, java.lang.String c)
          Inserts the specified element at the specified position in this hash table with the provided color.
 boolean add(java.lang.Object v)
          Add the specified object to this hash table using Java's built-in hash code mod the size of the table.
 boolean add(java.lang.Object v, java.lang.String c)
          Add the specified object to this hash table using Java's built-in hash code mod the size of the table with the provided color.
 boolean contains(java.lang.Object v)
          Returns true if this hash table contains the specified element.
 boolean isEmpty()
          Returns true if the hash table is empty.
 int number_items()
          Return the number of items in the hash table.
 boolean remove(java.lang.Object o)
          Removes the specified element in this hash table.
 java.lang.String toXML()
          Creates and returns GAIGS XML code for the current state of the hash table
 
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

GAIGShashStruct

public GAIGShashStruct(int size)
Use all default rendering values

Parameters:
size - Size of the hash table.

GAIGShashStruct

public GAIGShashStruct(java.lang.String name,
                       java.lang.String color,
                       double x1,
                       double y1,
                       double x2,
                       double y2,
                       double fontSize,
                       int size)
Parameters:
name - Name of the hashtable root.
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.
size - Size of the hash table.

GAIGShashStruct

public GAIGShashStruct(java.lang.String name,
                       java.lang.String hash_struct_root_color,
                       double x1,
                       double y1,
                       double x2,
                       double y2,
                       double fontSize,
                       int size,
                       java.lang.String[] hash_struct_list_colors)
Parameters:
name - Display name of this structure.
hash_struct_root_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.
size - Size of the hash table.
hash_struct_list_colors - array of colors for the (initially empty) hashboxes
Method Detail

add

public boolean add(java.lang.Object v)
Add the specified object to this hash table using Java's built-in hash code mod the size of the table. Default color will be used for this item.

Parameters:
v - The value to be stored.

add

public boolean add(java.lang.Object v,
                   java.lang.String c)
Add the specified object to this hash table using Java's built-in hash code mod the size of the table with the provided color.

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

add

public boolean add(int index,
                   java.lang.Object v)
Inserts the specified element at the specified position in this hash table. Default color will be used for this item.

Parameters:
index - The table position
v - The value to be stored.

add

public boolean add(int index,
                   java.lang.Object v,
                   java.lang.String c)
Inserts the specified element at the specified position in this hash table with the provided color.

Parameters:
index - The table position
v - The value to be stored.
c - The color to be stored.

contains

public boolean contains(java.lang.Object v)
Returns true if this hash table contains the specified element.

Parameters:
v - The value to be searched for.

isEmpty

public boolean isEmpty()
Returns true if the hash table is empty.


remove

public boolean remove(java.lang.Object o)
Removes the specified element in this hash table. Return true if the item was found and removed.

Parameters:
o - The object to be removed.

number_items

public int number_items()
Return the number of items in the hash table.


toXML

public java.lang.String toXML()
Creates and returns GAIGS XML code for the current state of the hash table

Returns:
A String containing GAIGS XML code for the hash table