Package com.amazon.ion
Interface IonSymbol
-
- All Known Subinterfaces:
_Private_IonSymbol
public interface IonSymbol extends IonText
An Ionsymbolvalue.WARNING: This interface should not be implemented or extended by code outside of this library.
-
-
Field Summary
-
Fields inherited from interface com.amazon.ion.IonValue
EMPTY_ARRAY
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description IonSymbolclone()Creates a copy of this value and all of its children.intgetSymbolId()Deprecated.UsesymbolValue()instead.voidsetValue(java.lang.String value)Changes the value of this element.java.lang.StringstringValue()Gets the text content of this symbol.SymbolTokensymbolValue()Returns this value as a symbol token (text + ID).-
Methods inherited from interface com.amazon.ion.IonValue
accept, addTypeAnnotation, clearTypeAnnotations, equals, getContainer, getFieldId, getFieldName, getFieldNameSymbol, getSymbolTable, getSystem, getType, getTypeAnnotations, getTypeAnnotationSymbols, hashCode, hasTypeAnnotation, isNullValue, isReadOnly, makeReadOnly, removeFromContainer, removeTypeAnnotation, setTypeAnnotations, setTypeAnnotationSymbols, topLevelValue, toPrettyString, toString, toString, writeTo
-
-
-
-
Method Detail
-
stringValue
java.lang.String stringValue() throws UnknownSymbolExceptionGets the text content of this symbol.- Specified by:
stringValuein interfaceIonText- Returns:
- the text of the symbol, or
nullif this isnull.symbol. - Throws:
UnknownSymbolException- if this symbol has unknown text.- See Also:
symbolValue()
-
getSymbolId
@Deprecated int getSymbolId() throws NullValueExceptionDeprecated.UsesymbolValue()instead.Gets the integer symbol id used in the binary encoding of this symbol.- Returns:
- an integer greater than zero, if this value has an associated
symbol table. Otherwise, return
SymbolTable.UNKNOWN_SYMBOL_ID. - Throws:
NullValueException- if this isnull.symbol.
-
symbolValue
SymbolToken symbolValue()
Returns this value as a symbol token (text + ID).- Returns:
- null if
IonValue.isNullValue()
-
setValue
void setValue(java.lang.String value)
Changes the value of this element.
-
clone
IonSymbol clone() throws UnknownSymbolException
Description copied from interface:IonValueCreates a copy of this value and all of its children. The cloned value may use the same shared symbol tables, but it will have an independent local symbol table if necessary. The cloned value will be modifiable regardless of whether this instanceIonValue.isReadOnly().The cloned value will be created in the context of the same
ValueFactoryas this instance; if you want a copy using a different factory, then useValueFactory.clone(IonValue)instead.- Specified by:
clonein interfaceIonText- Specified by:
clonein interfaceIonValue- Throws:
UnknownSymbolException- if any part of this value has unknown text but known Sid for its field name, annotation or symbol.
-
-