public interface IonContainer extends IonValue, Iterable<IonValue>
struct, list, and
sexp types.
WARNING: This interface should not be implemented or extended by code outside of this library.
EMPTY_ARRAY| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Clears the contents of this container (if any) and set it to empty.
|
IonContainer |
clone()
Creates a copy of this value and all of its children.
|
boolean |
isEmpty()
Checks if this container is empty.
|
Iterator<IonValue> |
iterator()
Creates an iterator providing the (direct) elements of this container.
|
void |
makeNull()
Sets the contents of this container to an Ion
null
value. |
boolean |
remove(IonValue element)
Removes the given element from this container.
|
int |
size()
Returns the number of elements in this container.
|
accept, addTypeAnnotation, clearTypeAnnotations, equals, getContainer, getFieldName, getFieldNameSymbol, getSymbolTable, getSystem, getType, getTypeAnnotations, getTypeAnnotationSymbols, hashCode, hasTypeAnnotation, isNullValue, isReadOnly, makeReadOnly, removeFromContainer, removeTypeAnnotation, setTypeAnnotations, setTypeAnnotationSymbols, topLevelValue, toPrettyString, toString, toString, writeToforEach, spliteratorint size()
this.isNullValue().Iterator<IonValue> iterator()
Note that iteration over a IonStruct has unspecified ordering,
while iteration over an IonSequence (IonList or
IonSexp) must return elements
in order of their appearance in the Ion representation.
boolean remove(IonValue element)
false.
Note that, unlike Collection.remove(Object), this method uses
object identity, not Object.equals(Object), to find the element.
That is, the given instance is removed, not other similarly "equal"
instances.
element - the element to be removed from this container,
if present.true if this container contained the specified
element.NullPointerException - if the element
is null.boolean isEmpty()
throws NullValueException
true if this container has no contentsNullValueException - if this container is an Ion
null valuevoid clear()
null value, set it to
empty.
Use makeNull() to make this container null rather than empty.
WARNING: This method is not support for instances of
IonDatagram.
void makeNull()
null
value.
Use clear() to make this container empty rather than null.
IonContainer clone() throws UnknownSymbolException
IonValueIonValue.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.
clone in interface IonValueUnknownSymbolException - if any part of this value has unknown text but known Sid for
its field name, annotation or symbol.