public class FTableDatabase extends java.lang.Object implements java.lang.Iterable<FloatTable>, java.lang.Cloneable, java.io.Serializable
Modified by: Joseph A. Huwaldt
Constructor and Description |
---|
FTableDatabase()
Creates an empty TableDatabase object that can be used to
contain FloatTable objects.
|
FTableDatabase(FloatTable table)
Creates a FTableDatabase object that contains the specified table.
|
FTableDatabase(FloatTable[] tables)
Creates a FTableDatabase object from an array of FloatTable objects.
|
Modifier and Type | Method and Description |
---|---|
void |
addAllNotes(java.lang.String[] noteArr)
Add all the notes in an array of Strings to the list of
notes associated with this table database.
|
void |
addNote(java.lang.String note)
Add a new note String to the list of notes associated with
this table database.
|
void |
clear()
Clear this database so that it contains no tables.
|
void |
clearNotes()
Removes all notes associated with this table database.
|
java.lang.Object |
clone()
Creates a deep copy of this table database object
and all the tables that it contains.
|
boolean |
contains(FloatTable value)
Tests to see if the specified table object is contained
in this database.
|
boolean |
containsName(java.lang.String name)
Tests to see if a table exists in the database with the
specified name.
|
FloatTable |
get(int index)
Returns the table with the specified index from the database.
|
FloatTable |
get(java.lang.String name)
Returns the table with the specified name from the database.
|
java.lang.String[] |
getAllNotes()
Get all the note Strings associated with this table database
and return them as an array of Strings.
|
java.lang.String |
getNote(int index)
Get a specified note String from the list of notes
associated with this table database.
|
boolean |
isEmpty()
Tests if the database has no elements in it.
|
java.util.Iterator<FloatTable> |
iterator()
Returns an Iterator of the table objects contained
in this database.
|
int |
numberOfNotes()
Returns the number of notes associated with this table database.
|
FloatTable |
put(FloatTable value)
Add the specified table to this database.
|
void |
putAll(FTableDatabase database)
Add the contents of the specified table database to this database.
|
FloatTable |
remove(java.lang.String name)
Remove the named table from this database.
|
java.lang.String |
removeNote(int index)
Remove a specified note String from the list of notes
associated with this table database.
|
int |
size()
Returns the number of tables in this table database.
|
FloatTable[] |
toArray()
Return the contents of this table database as an array
of FloatTable objects.
|
java.lang.String |
toString()
Returns a String representation of this FTableDatabase object.
|
public FTableDatabase()
public FTableDatabase(FloatTable table)
table
- A single table to create this database from.public FTableDatabase(FloatTable[] tables)
tables
- An array of tables to create this database from.public int size()
public boolean isEmpty()
public java.util.Iterator<FloatTable> iterator()
iterator
in interface java.lang.Iterable<FloatTable>
public FloatTable[] toArray()
public boolean contains(FloatTable value)
value
- The table object being searched for.public boolean containsName(java.lang.String name)
name
- The name we are looking for in the database.public FloatTable get(java.lang.String name)
name
- The name of the table we are looking for in the database.public FloatTable get(int index)
index
- The index of the table desired in the database.public void putAll(FTableDatabase database)
database
- The new table databae, the contents of which are to be added to this database.public FloatTable put(FloatTable value)
value
- The new table to be added to the database.public FloatTable remove(java.lang.String name)
name
- The name of the table to be removed.public void clear()
public int numberOfNotes()
public void addNote(java.lang.String note)
note
- The new note to add to this database.public void addAllNotes(java.lang.String[] noteArr)
noteArr
- The array of new notes to add to this database.public java.lang.String getNote(int index)
index
- The index of the note to retrieve.java.lang.ArrayIndexOutOfBoundsException
- if the specified
index is out of bounds or if there are no notes
associated with this database.public java.lang.String[] getAllNotes()
public java.lang.String removeNote(int index)
index
- The index of the note to remove.java.lang.ArrayIndexOutOfBoundsException
- if the specified
index is out of bounds or if there are no notes
associated with this database.public void clearNotes()
public java.lang.Object clone()
clone
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object