Top Inners Fields Constructors Methods
com.amazon.ion.impl.lite

pack-priv abstract Class IonContainerLite

extends IonValueLite
implements _Private_IonContainer, IonContext
Class Inheritance
All Implemented Interfaces
com.amazon.ion.impl.lite.IonContext, com.amazon.ion.impl._Private_IonContainer, com.amazon.ion.IonContainer, java.lang.Iterable, com.amazon.ion.IonValue, java.lang.Cloneable
Known Direct Subclasses
com.amazon.ion.impl.lite.IonSequenceLite, com.amazon.ion.impl.lite.IonStructLite
Imports
com.amazon.ion.ContainedValueException, .IonContainer, .IonDatagram, .IonException, .IonValue, .IonWriter, .NullValueException, .ReadOnlyValueException, .SymbolTable, .ValueVisitor, com.amazon.ion.impl._Private_IonConstants, ._Private_IonContainer, ._Private_Utils, java.io.IOException, java.util.Arrays, .HashMap, .Iterator, .ListIterator, .NoSuchElementException

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class
protected class
IonContainerLite.SequenceContentIterator

Encapsulates an iterator and implements a custom remove method

Field Summary

Modifier and TypeField and Description
protected int
protected IonValueLite[]
pack-priv static final int[]
INITIAL_SIZE

sizes for the various types of containers expected to be tuned.

protected IonSystemLite
pack-priv static final int[]
pack-priv static final int
protected int
Inherited from com.amazon.ion.impl.lite.IonValueLite:
_annotations_context_fieldNameCONTAINER_STACK_INITIAL_CAPACITYELEMENT_SHIFTIS_AUTO_CREATEDIS_BOOL_TRUEIS_IVMIS_LOCKEDIS_NULL_VALUEIS_SYMBOL_ID_PRESENTIS_SYMBOL_PRESENTIS_SYSTEM_VALUE

Constructor Summary

AccessConstructor and Description
protected
IonContainerLite(ContainerlessContext context, boolean isNull)

pack-priv

Method Summary

Modifier and TypeMethod and Description
public abstract void
accept(ValueVisitor
will have one of its visit methods called.
visitor
)

Redeclares com.amazon.ion.IonValue.accept.

Implements abstract com.amazon.ion.impl.lite.IonValueLite.accept.

Entry point for visitor pattern.

public boolean
add(IonValue child)

pack-priv void
add(int index, IonValueLite
must not be null.
child
)

Validates the child and checks locks.

protected int
add_child(int idx, IonValueLite child)

Does not validate the child or check locks.

pack-priv void
afterIteratorRemove(IonValueLite
the value that was removed.
value
,
int
the container index of the value that was removed.
idx
)

Called after a value is removed from the SequenceContentIterator.

pack-priv void
beforeIteratorRemove(IonValueLite
the value that will be removed.
value
,
int
the container index of the value that will be removed.
idx
)

Called before a value is removed from the SequenceContentIterator.

public void
clear()

Implements com.amazon.ion.IonContainer.clear.

Clears the contents of this container (if any) and set it to empty.

public IonContainer
clone()

Implements abstract com.amazon.ion.impl.lite.IonValueLite.clone.

Implements com.amazon.ion.IonContainer.clone, com.amazon.ion.IonValue.clone.

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

pack-priv final IonContainerLite

Returns:

the clone.
deepClone
(boolean
true if the value to be cloned is an IonDatagram; otherwise, false.
isDatagramBeingCloned
)

Clones the container by walking it iteratively.

private void
pack-priv void
forceMaterializationOfLazyState()

Force any lazy state to be materialized (if applicable).

public IonValue
get(int index)

public final IonValueLite
public final int
public final IonContainerLite
getContextContainer()

Implements com.amazon.ion.impl.lite.IonContext.getContextContainer.

methods from IonValue public void deepMaterialize() public IonContainer getContainer() public int getFieldId() public String getFieldName() public String[] getTypeAnnotations() public boolean hasTypeAnnotation(String annotation) public boolean isNullValue() public boolean isReadOnly() public void removeTypeAnnotation(String annotation)

pack-priv IonContext
getContextForIndex(IonValue element, int index)

public final SymbolTable

Returns:

null, since symbol tables are only directly assigned to top-level values.
getContextSymbolTable
()

Implements com.amazon.ion.impl.lite.IonContext.getContextSymbolTable.

Returns the symbol table that is directly assigned to this context.

public IonSystemLite
getSystem()

Overrides com.amazon.ion.impl.lite.IonValueLite.getSystem.

Implements com.amazon.ion.IonValue.getSystem, com.amazon.ion.impl.lite.IonContext.getSystem.

Get the IonSystem concrete object that created the IonValue that is associated with this context.

protected final int
public boolean
isEmpty()

Implements com.amazon.ion.IonContainer.isEmpty.

Checks if this container is empty.

public final Iterator<IonValue>
iterator()

Implements com.amazon.ion.IonContainer.iterator.

Creates an iterator providing the (direct) elements of this container.

public final ListIterator<IonValue>
public ListIterator<IonValue>
listIterator(int index)

pack-priv static int[]
pack-priv static int[]
public void
makeNull()

Implements com.amazon.ion.IonContainer.makeNull.

Sets the contents of this container to an Ion null value.

protected final int
nextSize(int current_size, boolean call_transition)

public final void
patch_elements_helper(int lowest_bad_idx)

public boolean
remove(IonValue
the element to be removed from this container, if present.
element
)

Implements com.amazon.ion.IonContainer.remove.

Removes the given element from this container.

pack-priv void
remove_child(int idx)

Does not check locks.

pack-priv final int
scalarHashCode()

Implements abstract com.amazon.ion.impl.lite.IonValueLite.scalarHashCode.

Internal HashCode implementation to be overridden by scalar subclasses.

pack-priv final IonValueLite
set_child(int idx, IonValueLite child)

private static void
setCloneContext(IonContainerLite.CloneContext
the context to fill in.
cloneContext
,
IonContainerLite
the container being cloned.
containerOriginal
,
IonContainerLite
the container clone.
containerCopy
,
boolean
true if the value being cloned is a child of a datagram.
needsTopLevelContext
)

Prepares a CloneContext for the container that is about to be walked.

public int
size()

Implements com.amazon.ion.IonContainer.size.

Returns the number of elements in this container.

pack-priv void
transitionToLargeSize(int size)

This is overridden in IonStructLite to add the HashMap of field names when the struct becomes moderately large.

pack-priv void
validateNewChild(IonValue child)

Ensures that a potential new child is non-null, has no container, is not read-only, and is not a datagram.

pack-priv final void
writeBodyTo(IonWriter
an IonWriter.
writer
,
_Private_IonValue.SymbolTableProvider
a SymbolTableProvider.
symbolTableProvider
)

Implements abstract com.amazon.ion.impl.lite.IonValueLite.writeBodyTo.

Writes a *non-null scalar* value to the given writer.

Inherited from com.amazon.ion.impl.lite.IonValueLite:
_elementid_elementid_getMetadata_isAutoCreated_isAutoCreated_isBoolTrue_isBoolTrue_isIVM_isIVM_isLocked_isLocked_isNullValue_isNullValue_isSymbolIdPresent_isSymbolIdPresent_isSymbolPresent_isSymbolPresent_isSystemValue_isSystemValue_setMetadataaddTypeAnnotationattemptClearSymbolIDValuescascadeSIDPresentToContextRootcheckAnnotationsForSidscheckForLockclearSymbolIDValuesclearTypeAnnotationscopyFieldNamedetachFromContainerdumpequalsfindTypeAnnotationgetAssignedSymbolTablegetContainergetContextgetElementIdgetFieldIdgetFieldNamegetFieldNameIdgetFieldNameSymbolgetFieldNameSymbolgetKnownFieldNameSymbolgetSymbolTablegetTypegetTypeAnnotationsgetTypeAnnotationSymbolsgetTypeAnnotationSymbolsgetTypeSlowhashCodehashSignaturehashTypeAnnotationshasTypeAnnotationisNullValueisReadOnlymakeReadOnlymakeReadOnlyInternalremoveFromContainerremoveTypeAnnotationsetContextsetFieldNamesetFieldNameSymbolsetSymbolTablesetTypeAnnotationssetTypeAnnotationSymbolsshallowClonetopLevelValuetoPrettyStringtoStringtoStringvalidatevalidateThisNotNullwriteTowriteTo

Field Detail

_child_countback to summary
protected int _child_count
_childrenback to summary
protected IonValueLite[] _children
INITIAL_SIZEback to summary
pack-priv static final int[] INITIAL_SIZE

sizes for the various types of containers expected to be tuned.

ionSystemback to summary
protected IonSystemLite ionSystem
NEXT_SIZEback to summary
pack-priv static final int[] NEXT_SIZE
STRUCT_INITIAL_SIZEback to summary
pack-priv static final int STRUCT_INITIAL_SIZE
structuralModificationCountback to summary
protected int structuralModificationCount

Constructor Detail

IonContainerLiteback to summary
protected IonContainerLite(ContainerlessContext context, boolean isNull)
IonContainerLiteback to summary
pack-priv IonContainerLite(IonContainerLite existing, IonContext context)

Method Detail

acceptback to summary
public abstract void accept(ValueVisitor visitor) throws Exception

Redeclares com.amazon.ion.IonValue.accept.

Implements abstract com.amazon.ion.impl.lite.IonValueLite.accept.

Doc from com.amazon.ion.IonValue.accept.

Entry point for visitor pattern. Implementations of this method by concrete classes will simply call the appropriate visit method on the visitor. For example, instances of IonBool will invoke ValueVisitor#visit(IonBool).

Parameters
visitor:ValueVisitor

will have one of its visit methods called.

Annotations
@Override
Exceptions
Exception:
any exception thrown by the visitor is propagated.
addback to summary
public boolean add(IonValue child) throws NullPointerException, IllegalArgumentException, ContainedValueException
addback to summary
pack-priv void add(int index, IonValueLite child) throws ContainedValueException, NullPointerException

Validates the child and checks locks.

Parameters
child:IonValueLite

must not be null.

Exceptions
NullPointerException:
if the element is null.
IndexOutOfBoundsException:
if the index is out of range (index < 0 || index > size()).
add_childback to summary
protected int add_child(int idx, IonValueLite child)

Does not validate the child or check locks.

afterIteratorRemoveback to summary
pack-priv void afterIteratorRemove(IonValueLite value, int idx)

Called after a value is removed from the SequenceContentIterator. May be overridden by subclasses that require custom behavior.

Parameters
value:IonValueLite

the value that was removed.

idx:int

the container index of the value that was removed.

beforeIteratorRemoveback to summary
pack-priv void beforeIteratorRemove(IonValueLite value, int idx)

Called before a value is removed from the SequenceContentIterator. May be overridden by subclasses that require custom behavior.

Parameters
value:IonValueLite

the value that will be removed.

idx:int

the container index of the value that will be removed.

clearback to summary
public void clear()

Implements com.amazon.ion.IonContainer.clear.

Doc from com.amazon.ion.IonContainer.clear.

Clears the contents of this container (if any) and set it to empty. If this container is an Ion 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.

cloneback to summary
public IonContainer clone()

Implements abstract com.amazon.ion.impl.lite.IonValueLite.clone.

Implements com.amazon.ion.IonContainer.clone, com.amazon.ion.IonValue.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.

Returns:IonContainer

Doc from java.lang.Object.clone.

a clone of this instance.

Annotations
@Override
deepCloneback to summary
pack-priv final IonContainerLite deepClone(boolean isDatagramBeingCloned)

Clones the container by walking it iteratively.

Parameters
isDatagramBeingCloned:boolean

true if the value to be cloned is an IonDatagram; otherwise, false.

Returns:IonContainerLite

the clone.

detachAllChildrenback to summary
private void detachAllChildren()
forceMaterializationOfLazyStateback to summary
pack-priv void forceMaterializationOfLazyState()

Force any lazy state to be materialized (if applicable).

getback to summary
public IonValue get(int index) throws NullValueException
get_childback to summary
public final IonValueLite get_child(int idx)

Implements com.amazon.ion.impl._Private_IonContainer.get_child.

get_child_countback to summary
public final int get_child_count()

Implements com.amazon.ion.impl._Private_IonContainer.get_child_count.

getContextContainerback to summary
public final IonContainerLite getContextContainer()

Implements com.amazon.ion.impl.lite.IonContext.getContextContainer.

methods from IonValue public void deepMaterialize() public IonContainer getContainer() public int getFieldId() public String getFieldName() public String[] getTypeAnnotations() public boolean hasTypeAnnotation(String annotation) public boolean isNullValue() public boolean isReadOnly() public void removeTypeAnnotation(String annotation)

Returns:IonContainerLite

Doc from com.amazon.ion.impl.lite.IonContext.getContextContainer.

the container of the value; null for stand-alone top level values.

getContextForIndexback to summary
pack-priv IonContext getContextForIndex(IonValue element, int index)
getContextSymbolTableback to summary
public final SymbolTable getContextSymbolTable()

Implements com.amazon.ion.impl.lite.IonContext.getContextSymbolTable.

Doc from com.amazon.ion.impl.lite.IonContext.getContextSymbolTable.

Returns the symbol table that is directly assigned to this context. For TopLevelContext it is the symbol table member. For IonContainerLite and IonSystemLite it is null.

Returns:SymbolTable

null, since symbol tables are only directly assigned to top-level values.

getSystemback to summary
public IonSystemLite getSystem()

Overrides com.amazon.ion.impl.lite.IonValueLite.getSystem.

Implements com.amazon.ion.IonValue.getSystem, com.amazon.ion.impl.lite.IonContext.getSystem.

Doc from com.amazon.ion.impl.lite.IonContext.getSystem.

Get the IonSystem concrete object that created the IonValue that is associated with this context. Generally this delegates to the parent.

Returns:IonSystemLite

not null

Annotations
@Override
initialSizeback to summary
protected final int initialSize()
isEmptyback to summary
public boolean isEmpty() throws NullValueException

Implements com.amazon.ion.IonContainer.isEmpty.

Doc from com.amazon.ion.IonContainer.isEmpty.

Checks if this container is empty.

Returns:boolean

true if this container has no contents

Exceptions
NullValueException:
if this container is an Ion null value
iteratorback to summary
public final Iterator<IonValue> iterator()

Implements com.amazon.ion.IonContainer.iterator.

Doc from com.amazon.ion.IonContainer.iterator.

Creates an iterator providing the (direct) elements of this container. If this is an Ion null value, then this method returns an empty 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.

Returns:Iterator<IonValue>

a new iterator, not null.

listIteratorback to summary
public final ListIterator<IonValue> listIterator()
listIteratorback to summary
public ListIterator<IonValue> listIterator(int index)
make_initial_size_arrayback to summary
pack-priv static int[] make_initial_size_array()
make_next_size_arrayback to summary
pack-priv static int[] make_next_size_array()
makeNullback to summary
public void makeNull()

Implements com.amazon.ion.IonContainer.makeNull.

Doc from com.amazon.ion.IonContainer.makeNull.

Sets the contents of this container to an Ion null value.

Use clear to make this container empty rather than null.

nextSizeback to summary
protected final int nextSize(int current_size, boolean call_transition)
patch_elements_helperback to summary
public final void patch_elements_helper(int lowest_bad_idx)
removeback to summary
public boolean remove(IonValue element)

Implements com.amazon.ion.IonContainer.remove.

Doc from com.amazon.ion.IonContainer.remove.

Removes the given element from this container. If this is an Ion null value, then this method returns 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.

Parameters
element:IonValue

the element to be removed from this container, if present.

Returns:boolean

true if this container contained the specified element.

remove_childback to summary
pack-priv void remove_child(int idx)

Does not check locks.

scalarHashCodeback to summary
pack-priv final int scalarHashCode()

Implements abstract com.amazon.ion.impl.lite.IonValueLite.scalarHashCode.

Doc from com.amazon.ion.impl.lite.IonValueLite.scalarHashCode.

Internal HashCode implementation to be overridden by scalar subclasses. Must only be called on non-null values.

Annotations
@Override
set_childback to summary
pack-priv final IonValueLite set_child(int idx, IonValueLite child)
setCloneContextback to summary
private static void setCloneContext(IonContainerLite.CloneContext cloneContext, IonContainerLite containerOriginal, IonContainerLite containerCopy, boolean needsTopLevelContext)

Prepares a CloneContext for the container that is about to be walked.

Parameters
cloneContext:IonContainerLite.CloneContext

the context to fill in.

containerOriginal:IonContainerLite

the container being cloned.

containerCopy:IonContainerLite

the container clone.

needsTopLevelContext:boolean

true if the value being cloned is a child of a datagram.

sizeback to summary
public int size()

Implements com.amazon.ion.IonContainer.size.

Doc from com.amazon.ion.IonContainer.size.

Returns the number of elements in this container.

Returns:int

the number of elements, zero if this.isNullValue().

transitionToLargeSizeback to summary
pack-priv void transitionToLargeSize(int size)

This is overridden in IonStructLite to add the HashMap of field names when the struct becomes moderately large.

validateNewChildback to summary
pack-priv void validateNewChild(IonValue child) throws ContainedValueException, NullPointerException, IllegalArgumentException

Ensures that a potential new child is non-null, has no container, is not read-only, and is not a datagram.

Exceptions
ContainedValueException:
if child is already part of a container.
NullPointerException:
if child is null.
IllegalArgumentException:
if child is an IonDatagram.
ReadOnlyValueException:
if child is read only.
writeBodyToback to summary
pack-priv final void writeBodyTo(IonWriter writer, _Private_IonValue.SymbolTableProvider symbolTableProvider) throws IOException

Implements abstract com.amazon.ion.impl.lite.IonValueLite.writeBodyTo.

Doc from com.amazon.ion.impl.lite.IonValueLite.writeBodyTo.

Writes a *non-null scalar* value to the given writer. It is incorrect to call this method on a container value.

Parameters
writer:IonWriter

an IonWriter.

symbolTableProvider:_Private_IonValue.SymbolTableProvider

a SymbolTableProvider.

Annotations
@Override
Exceptions
IOException:
if thrown when writing the value.
com.amazon.ion.impl.lite back to summary

private Class IonContainerLite.CloneContext

extends Object
Class Inheritance

Field Summary

Modifier and TypeField and Description
pack-priv int
pack-priv IonContext
pack-priv IonContainerLite
pack-priv boolean
pack-priv IonContainerLite

Constructor Summary

AccessConstructor and Description
private

Method Summary

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

childIndexback to summary
pack-priv int childIndex
contextCopyback to summary
pack-priv IonContext contextCopy
parentCopyback to summary
pack-priv IonContainerLite parentCopy
parentIsStructback to summary
pack-priv boolean parentIsStruct
parentOriginalback to summary
pack-priv IonContainerLite parentOriginal

Constructor Detail

CloneContextback to summary
private CloneContext()
com.amazon.ion.impl.lite back to summary

protected Class IonContainerLite.SequenceContentIterator

extends Object
implements ListIterator<IonValue>
Class Inheritance
  • java.lang.Object
  • com.amazon.ion.impl.lite.IonContainerLite.SequenceContentIterator
All Implemented Interfaces
java.util.ListIterator, java.util.Iterator

Encapsulates an iterator and implements a custom remove method

Field Summary

Modifier and TypeField and Description
protected IonValueLite
protected boolean
protected int
protected final boolean

Constructor Summary

AccessConstructor and Description
public
SequenceContentIterator(int index, boolean readOnly)

Method Summary

Modifier and TypeMethod and Description
public void
add(IonValue
the element to insert
element
)

Implements java.util.ListIterator.add.

Inserts the specified element into the list (optional operation).

protected final void
private final void
public final boolean
hasNext()

Implements java.util.ListIterator.hasNext.

Returns true if this list iterator has more elements when traversing the list in the forward direction.

public final boolean
hasPrevious()

Implements java.util.ListIterator.hasPrevious.

Returns true if this list iterator has more elements when traversing the list in the reverse direction.

public IonValue
next()

Implements java.util.ListIterator.next.

Returns the next element in the list and advances the cursor position.

public final int
nextIndex()

Implements java.util.ListIterator.nextIndex.

Returns the index of the element that would be returned by a subsequent call to next.

pack-priv IonValueLite
nextOrNull()

Returns the next element, or null if there are no more elements.

public IonValue
previous()

Implements java.util.ListIterator.previous.

Returns the previous element in the list and moves the cursor position backwards.

public final int
previousIndex()

Implements java.util.ListIterator.previousIndex.

Returns the index of the element that would be returned by a subsequent call to previous.

public void
remove()

Implements java.util.ListIterator.remove.

Sets the container to dirty after calling Iterator#remove() on the encapsulated iterator

public void
set(IonValue
the element with which to replace the last element returned by next or previous
element
)

Implements java.util.ListIterator.set.

Replaces the last element returned by next or previous with the specified element (optional operation).

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

__currentback to summary
protected IonValueLite __current
__lastMoveWasPreviousback to summary
protected boolean __lastMoveWasPrevious
__posback to summary
protected int __pos
__readOnlyback to summary
protected final boolean __readOnly

Constructor Detail

SequenceContentIteratorback to summary
public SequenceContentIterator(int index, boolean readOnly)

Method Detail

addback to summary
public void add(IonValue element)

Implements java.util.ListIterator.add.

Doc from java.util.ListIterator.add.

Inserts the specified element into the list (optional operation). The element is inserted immediately before the element that would be returned by next, if any, and after the element that would be returned by previous, if any. (If the list contains no elements, the new element becomes the sole element on the list.) The new element is inserted before the implicit cursor: a subsequent call to next would be unaffected, and a subsequent call to previous would return the new element. (This call increases by one the value that would be returned by a call to nextIndex or previousIndex.)

Parameters
element:IonValue

the element to insert

force_position_syncback to summary
protected final void force_position_sync()
force_position_sync_helperback to summary
private final void force_position_sync_helper()
hasNextback to summary
public final boolean hasNext()

Implements java.util.ListIterator.hasNext.

Doc from java.util.ListIterator.hasNext.

Returns true if this list iterator has more elements when traversing the list in the forward direction. (In other words, returns true if next would return an element rather than throwing an exception.)

Returns:boolean

true if the list iterator has more elements when traversing the list in the forward direction

hasPreviousback to summary
public final boolean hasPrevious()

Implements java.util.ListIterator.hasPrevious.

Doc from java.util.ListIterator.hasPrevious.

Returns true if this list iterator has more elements when traversing the list in the reverse direction. (In other words, returns true if previous would return an element rather than throwing an exception.)

Returns:boolean

true if the list iterator has more elements when traversing the list in the reverse direction

nextback to summary
public IonValue next()

Implements java.util.ListIterator.next.

Doc from java.util.ListIterator.next.

Returns the next element in the list and advances the cursor position. This method may be called repeatedly to iterate through the list, or intermixed with calls to previous to go back and forth. (Note that alternating calls to next and previous will return the same element repeatedly.)

Returns:IonValue

the next element in the list

nextIndexback to summary
public final int nextIndex()

Implements java.util.ListIterator.nextIndex.

Doc from java.util.ListIterator.nextIndex.

Returns the index of the element that would be returned by a subsequent call to next. (Returns list size if the list iterator is at the end of the list.)

Returns:int

the index of the element that would be returned by a subsequent call to next, or list size if the list iterator is at the end of the list

nextOrNullback to summary
pack-priv IonValueLite nextOrNull()

Returns the next element, or null if there are no more elements. This does not call force_position_sync(), so it must only be called from contexts where it is guaranteed that the container has not been mutated since the last position sync.

previousback to summary
public IonValue previous()

Implements java.util.ListIterator.previous.

Doc from java.util.ListIterator.previous.

Returns the previous element in the list and moves the cursor position backwards. This method may be called repeatedly to iterate through the list backwards, or intermixed with calls to next to go back and forth. (Note that alternating calls to next and previous will return the same element repeatedly.)

Returns:IonValue

the previous element in the list

previousIndexback to summary
public final int previousIndex()

Implements java.util.ListIterator.previousIndex.

Doc from java.util.ListIterator.previousIndex.

Returns the index of the element that would be returned by a subsequent call to previous. (Returns -1 if the list iterator is at the beginning of the list.)

Returns:int

the index of the element that would be returned by a subsequent call to previous, or -1 if the list iterator is at the beginning of the list

removeback to summary
public void remove()

Implements java.util.ListIterator.remove.

Sets the container to dirty after calling Iterator#remove() on the encapsulated iterator

setback to summary
public void set(IonValue element)

Implements java.util.ListIterator.set.

Doc from java.util.ListIterator.set.

Replaces the last element returned by next or previous with the specified element (optional operation). This call can be made only if neither remove nor add have been called after the last call to next or previous.

Parameters
element:IonValue

the element with which to replace the last element returned by next or previous