Top Description Methods
com.amazon.ion

public Interface IonSymbol

extends IonText
Known Direct Subinterfaces
com.amazon.ion.impl._Private_IonSymbol

An Ion symbol value.

Warning

This interface should not be implemented or extended by code outside of this library.

Method Summary

Modifier and TypeMethod and Description
public IonSymbol
clone()

Redeclares com.amazon.ion.IonText.clone.

Creates a copy of this value and all of its children.

public int

Returns:

an integer greater than zero, if this value has an associated symbol table. Otherwise, return SymbolTable#UNKNOWN_SYMBOL_ID.
getSymbolId
()
Deprecated Use symbolValue() instead.

Gets the integer symbol id used in the binary encoding of this symbol.

public void
setValue(String
the new value of this symbol; may be null to make this null.symbol.
value
)

Redeclares com.amazon.ion.IonText.setValue.

Changes the value of this element.

public String

Returns:

the text of the symbol, or null if this is null.symbol.
stringValue
()

Redeclares com.amazon.ion.IonText.stringValue.

Gets the text content of this symbol.

public SymbolToken

Returns:

null if isNullValue()
symbolValue
()

Returns this value as a symbol token (text + ID).

Method Detail

cloneback to summary
public IonSymbol clone() throws UnknownSymbolException

Redeclares com.amazon.ion.IonText.clone.

Doc from com.amazon.ion.IonValue.clone.

Creates 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 instance isReadOnly().

The cloned value will be created in the context of the same ValueFactory as this instance; if you want a copy using a different factory, then use ValueFactory#clone(IonValue) instead.

Exceptions
UnknownSymbolException:
if any part of this value has unknown text but known Sid for its field name, annotation or symbol.
getSymbolIdback to summary
public int getSymbolId() throws NullValueException

Deprecated

Use symbolValue() instead.

Gets the integer symbol id used in the binary encoding of this symbol.

Returns:int

an integer greater than zero, if this value has an associated symbol table. Otherwise, return SymbolTable#UNKNOWN_SYMBOL_ID.

Annotations
@Deprecated
Exceptions
NullValueException:
if this is null.symbol.
setValueback to summary
public void setValue(String value)

Redeclares com.amazon.ion.IonText.setValue.

Changes the value of this element.

Parameters
value:String

the new value of this symbol; may be null to make this null.symbol.

stringValueback to summary
public String stringValue() throws UnknownSymbolException

Redeclares com.amazon.ion.IonText.stringValue.

Gets the text content of this symbol.

Returns:String

the text of the symbol, or null if this is null.symbol.

Exceptions
UnknownSymbolException:
if this symbol has unknown text.
symbolValueback to summary
public SymbolToken symbolValue()

Returns this value as a symbol token (text + ID).

Returns:SymbolToken

null if isNullValue()