Note that isSubstitute() is always true for instances of this
class.
| Modifier and Type | Class and Description |
|---|---|
| private class |
| Modifier and Type | Field and Description |
|---|---|
| private final int | |
| private final String | |
| private final SymbolTable | myOriginalSymTab
This is the original symbol table that is being substituted. |
| private final int |
| Access | Constructor and Description |
|---|---|
| pack-priv | |
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public SymbolToken | find(String
the symbol text to find. text)Implements com. Finds a symbol already interned by this table. |
| public String | findKnownSymbol(int
the requested symbol ID. id)Implements com. Gets the interned text for a symbol ID. |
| public int | findSymbol(String
must not be null or empty. text)Implements com. Gets the symbol ID associated with a given symbol name. |
| public int | getImportedMaxId()
Implements com. Gets the highest symbol id reserved by this table's imports (including system symbols). |
| public SymbolTable[] | getImportedTables()
Implements com. Gets the sequence of shared symbol tables imported by this (local) symbol table. |
| public String | getIonVersionId()
Implements com. Gets the identifier for the Ion version (and thus the system symbol table) used by this table. |
| public int | getMaxId()
Implements com. Gets the highest symbol id reserved by this table. |
| public String | |
| public SymbolTable | getSystemSymbolTable()
Implements com. Gets the system symbol table being used by this local table. |
| public int | getVersion()
Implements com. Gets the version of this symbol table. |
| public SymbolToken | intern(String
the symbol text to intern. text)Implements com. Adds a new symbol to this table, or finds an existing definition of it. |
| public boolean | isLocalTable()
Implements com. Determines whether this symbol table is local, and therefore unnamed and unversioned. |
| public boolean | isReadOnly()
Implements com. Determines whether this symbol table can have symbols added to it. |
| public boolean | isSharedTable()
Implements com. Determines whether this symbol table is shared, and therefore named, versioned, and read-only. |
| public boolean | isSubstitute()
Implements com. Determines whether this instance is substituting for an imported shared table for which no exact match was found in the catalog. |
| public boolean | isSystemTable()
Implements com. Determines whether this symbol table is a system symbol table, and therefore shared, named, versioned, and read-only. |
| public Iterator | iterateDeclaredSymbolNames()
Implements com. Creates an iterator that will return all non-imported symbol names, in order of their symbol IDs. |
| public void | makeReadOnly()
Implements com. Prevents this symbol table from accepting any more new symbols. |
| public void | writeTo(IonWriter
must not be null. writer)Implements com. Writes an Ion representation of this symbol table. |
| myMaxId | back to summary |
|---|---|
| private final int myMaxId | |
| myName | back to summary |
|---|---|
| private final String myName | |
| myOriginalSymTab | back to summary |
|---|---|
| private final SymbolTable myOriginalSymTab This is the original symbol table that is being substituted. Either null or a non-system shared table. | |
| myVersion | back to summary |
|---|---|
| private final int myVersion | |
| SubstituteSymbolTable | back to summary |
|---|---|
| pack-priv SubstituteSymbolTable(String name, int version, int maxId) | |
| SubstituteSymbolTable | back to summary |
|---|---|
| pack-priv SubstituteSymbolTable(SymbolTable original, int version, int maxId) | |
| find | back to summary |
|---|---|
| public SymbolToken find(String text) Implements com. Doc from com. Finds a symbol already interned by this table. This method will not necessarily return the same instance given the same input.
| |
| findKnownSymbol | back to summary |
|---|---|
| public String findKnownSymbol(int id) Implements com. Doc from com. Gets the interned text for a symbol ID.
| |
| findSymbol | back to summary |
|---|---|
| public int findSymbol(String text) Implements com. Doc from com. Gets the symbol ID associated with a given symbol name.
| |
| getImportedMaxId | back to summary |
|---|---|
| public int getImportedMaxId() Implements com. Doc from com. Gets the highest symbol id reserved by this table's imports (including system symbols). Any id higher than this value is a local symbol declared by this table. This value is zero for shared symbol tables, since they do not utilize imports. | |
| getImportedTables | back to summary |
|---|---|
| public SymbolTable[] getImportedTables() Implements com. Doc from com. Gets the sequence of shared symbol tables imported by this (local) symbol table. The result does not include a system table.
If this local table imported a shared table for which the relevant
If this local table imported a shared table for which the relevant
| |
| getIonVersionId | back to summary |
|---|---|
| public String getIonVersionId() Implements com. Doc from com. Gets the identifier for the Ion version (and thus the system symbol
table) used by this table.
The version identifier is a string of the form
| |
| getMaxId | back to summary |
|---|---|
| public int getMaxId() Implements com. Doc from com. Gets the highest symbol id reserved by this table.
| |
| getName | back to summary |
|---|---|
| public String getName() Implements com. Doc from com. Gets the unique name of this symbol table.
| |
| getSystemSymbolTable | back to summary |
|---|---|
| public SymbolTable getSystemSymbolTable() Implements com. Doc from com. Gets the system symbol table being used by this local table.
If
| |
| getVersion | back to summary |
|---|---|
| public int getVersion() Implements com. Doc from com. Gets the version of this symbol table.
| |
| intern | back to summary |
|---|---|
| public SymbolToken intern(String text) Implements com. Doc from com. Adds a new symbol to this table, or finds an existing definition of it.
The resulting This method will not necessarily return the same instance given the same input.
| |
| isLocalTable | back to summary |
|---|---|
| public boolean isLocalTable() Implements com. Doc from com. Determines whether this symbol table is local, and therefore unnamed and unversioned.
If this method returns | |
| isReadOnly | back to summary |
|---|---|
| public boolean isReadOnly() Implements com. Doc from com. Determines whether this symbol table can have symbols added to it. Shared symtabs are always read-only. Local symtabs can also be made read-only on demand, which enables some optimizations when writing data but will cause failures if new symbols are encountered.
| |
| isSharedTable | back to summary |
|---|---|
| public boolean isSharedTable() Implements com. Doc from com. Determines whether this symbol table is shared, and therefore named, versioned, and read-only.
If this method returns | |
| isSubstitute | back to summary |
|---|---|
| public boolean isSubstitute() Implements com. Doc from com. Determines whether this instance is substituting for an imported shared table for which no exact match was found in the catalog. Such tables are not authoritative and may not even have any symbol text at all (as is the case when no version of an imported table is found). Substitute tables are always shared, non-system tables. This implementation always returns true. | |
| isSystemTable | back to summary |
|---|---|
| public boolean isSystemTable() Implements com. Doc from com. Determines whether this symbol table is a system symbol table, and therefore shared, named, versioned, and read-only.
If this method returns | |
| iterateDeclaredSymbolNames | back to summary |
|---|---|
| public Iterator Implements com. Doc from com. Creates an iterator that will return all non-imported symbol names, in
order of their symbol IDs. The iterator will return
The first string returned by the iterator has a symbol ID that is one
more than
| |
| makeReadOnly | back to summary |
|---|---|
| public void makeReadOnly() Implements com. Doc from com. Prevents this symbol table from accepting any more new symbols. Shared symtabs are always read-only. Making a local symtab read-only enables some optimizations when writing data, but will cause failures if new symbols are encountered. | |
| writeTo | back to summary |
|---|---|
| public void writeTo(IonWriter writer) throws IOException Implements com. Doc from com. Writes an Ion representation of this symbol table.
| |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | |
| public String | |
| public void | remove()
Overrides default java. Removes from the underlying collection the last element returned by this iterator (optional operation). |
| myIndex | back to summary |
|---|---|
| private int myIndex | |
| myOriginalIterator | back to summary |
|---|---|
| private Iterator<String> myOriginalIterator | |
| SymbolIterator | back to summary |
|---|---|
| pack-priv SymbolIterator(Iterator<String> originalIterator) | |
| hasNext | back to summary |
|---|---|
| public boolean hasNext() Implements java. Doc from java. Returns
| |
| next | back to summary |
|---|---|
| public String next() Implements java. Doc from java. Returns the next element in the iteration.
| |
| remove | back to summary |
|---|---|
| public void remove() Overrides default java. Doc from java. Removes from the underlying collection the last element returned
by this iterator (optional operation). This method can be called
only once per call to The behavior of an iterator is unspecified if the underlying collection is modified while the iteration is in progress in any way other than by calling this method, unless an overriding class has specified a concurrent modification policy.
The behavior of an iterator is unspecified if this method is called
after a call to the | |