public class SimpleCatalog extends java.lang.Object implements IonMutableCatalog, java.lang.Iterable<SymbolTable>
IonCatalog as a hash table. There is no
automatic removal of entries.| Constructor and Description |
|---|
SimpleCatalog() |
| Modifier and Type | Method and Description |
|---|---|
SymbolTable |
getTable(java.lang.String name)
Gets a symbol table with a specific name and the highest version
possible.
|
SymbolTable |
getTable(java.lang.String name,
int version)
Gets a desired symbol table from this catalog, using an exact match if
possible.
|
java.util.Iterator<SymbolTable> |
iterator()
Constructs an iterator that enumerates all of the shared symbol tables
in this catalog, at the time of method invocation.
|
void |
putTable(SymbolTable table)
Adds a symbol table to this catalog.
|
SymbolTable |
removeTable(java.lang.String name,
int version)
Removes a symbol table from this catalog.
|
public SymbolTable getTable(java.lang.String name)
IonCataloggetTable in interface IonCatalogname - identifies the desired symbol table.null if this catalog has no table with the name.public SymbolTable getTable(java.lang.String name, int version)
IonCatalogImplentations must make a best effort to find an exact match. If an exact match cannot be found, then this method must make a best effort to find the best match available.
getTable in interface IonCatalognull.public void putTable(SymbolTable table)
IonMutableCatalogputTable in interface IonMutableCatalogtable - must be shared but not a system table or
substitute table.public SymbolTable removeTable(java.lang.String name, int version)
null if this catalog has
no matching table.public java.util.Iterator<SymbolTable> iterator()
iterator in interface java.lang.Iterable<SymbolTable>