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

pack-priv abstract Class IonSequenceLite

extends IonContainerLite
implements IonSequence
Class Inheritance
All Implemented Interfaces
com.amazon.ion.IonSequence, java.util.List, java.util.SequencedCollection, java.util.Collection, java.lang.Iterable, com.amazon.ion.IonContainer, com.amazon.ion.IonValue, java.lang.Cloneable
Known Direct Subclasses
com.amazon.ion.impl.lite.IonSexpLite, com.amazon.ion.impl.lite.IonDatagramLite, com.amazon.ion.impl.lite.IonListLite
Imports
com.amazon.ion.ContainedValueException, .IonSequence, .IonValue, .ValueFactory, com.amazon.ion.impl._Private_CurriedValueFactory, ._Private_IonValue, java.lang.reflect.Array, java.util.AbstractList, .ArrayList, .Collection, .ConcurrentModificationException, .IdentityHashMap, .Iterator, .List, .ListIterator, .Map

Nested and Inner Type Summary

Modifier and TypeClass and Description
private class
IonSequenceLite.SubListView

SubListView throws a ConcurrentModificationException if the parent list has any structural modifications, i.e. any operation that cause its size to change.

Field Summary

Modifier and TypeField and Description
protected static final IonValueLite[]
EMPTY_VALUE_ARRAY

A zero-length array.

Inherited from com.amazon.ion.impl.lite.IonContainerLite:
_child_count_childrenINITIAL_SIZEionSystemNEXT_SIZESTRUCT_INITIAL_SIZEstructuralModificationCount

Constructor Summary

AccessConstructor and Description
pack-priv
IonSequenceLite(ContainerlessContext context, boolean isNull)

pack-priv
pack-priv
IonSequenceLite(ContainerlessContext context, Collection<? extends IonValue>
the initial set of child elements. If null, then the new instance will have isNullValue() == true.
elements
)

Constructs a sequence value not backed by binary.

Method Summary

Modifier and TypeMethod and Description
public boolean
add(IonValue
is the value to be appended to this sequence.
element
)

Overrides com.amazon.ion.impl.lite.IonContainerLite.add.

Implements com.amazon.ion.IonSequence.add.

Appends a child value to the end of this sequence.

public ValueFactory
add()

Implements com.amazon.ion.IonSequence.add.

Provides a factory that when invoked constructs a new value and adds it to this sequence.

public void
add(int
index at which the specified element is to be inserted
index
,
IonValue
is the element to be appended to this sequence.
element
)

Implements com.amazon.ion.IonSequence.add.

Inserts a child value at the specified position in this sequence.

public ValueFactory
add(final int
element to be appended to this list
index
)

Implements com.amazon.ion.IonSequence.add.

Provides a factory that when invoked constructs a new value and adds it to this sequence at the specified position.

public boolean
addAll(Collection<? extends IonValue>
elements to be appended to this sequence.
c
)

Implements com.amazon.ion.IonSequence.addAll.

Appends all of the elements in the specified collection to the end of this sequence, in the order that they are returned by the collection's iterator.

public boolean
addAll(int
index at which to insert first element from the specified collection.
index
,
Collection<? extends IonValue>
elements to be inserted into this sequence.
c
)

Implements com.amazon.ion.IonSequence.addAll.

Inserts all of the elements in the specified collection into this sequence at the specified position.

private static void
checkSublistParameters(int size, int fromIndex, int toIndex)

public IonSequence
public boolean
contains(Object
element whose presence in this list is to be tested
o
)

Implements com.amazon.ion.IonSequence.contains.

Determines whether this sequence contains the given instance.

public boolean
containsAll(Collection<?>
collection to be checked for containment in this list
c
)

Implements com.amazon.ion.IonSequence.containsAll.

Determines whether this sequence contains all of the given instances.

public <T extends IonValue> T[]
extract(Class<T> type)

Implements com.amazon.ion.IonSequence.extract.

Removes all children of this sequence, returning them in an array.

public int
indexOf(Object
the element to search for.
o
)

Implements com.amazon.ion.IonSequence.indexOf.

Returns the index in the sequence of the specified element, or -1 if this sequence doesn't contain the element.

public int
lastIndexOf(Object
the element to search for.
o
)

Implements com.amazon.ion.IonSequence.lastIndexOf.

Returns the index in the sequence of the specified element, or -1 if this sequence doesn't contain the element.

public IonValue
remove(int
the index of the element to be removed.
index
)

Implements com.amazon.ion.IonSequence.remove.

Removes the element at the specified position.

public boolean
remove(Object
element to be removed from this list, if present
o
)

Implements com.amazon.ion.IonSequence.remove.

Removes a given IonValue from this sequence, if it is present.

public boolean
removeAll(Collection<?>
collection containing elements to be removed from this list
c
)

Implements com.amazon.ion.IonSequence.removeAll.

Removes all elements from this sequence that are also contained in the specified collection.

public boolean
retainAll(Collection<?>
collection containing elements to be retained in this list
c
)

Implements com.amazon.ion.IonSequence.retainAll.

Retains only the elements in this sequence that are also contained in the specified collection.

public IonValue
set(int
index of the element to replace.
index
,
IonValue
element to be stored at the specified position.
element
)

Implements com.amazon.ion.IonSequence.set.

Replaces the element at the specified position in this list with the specified element.

public List<IonValue>
subList(int
low endpoint (inclusive) of the subList
fromIndex
,
int
high endpoint (exclusive) of the subList
toIndex
)

Implements com.amazon.ion.IonSequence.subList.

Returns a view of the portion of this list according to List#subList(int, int) contract.

public IonValue[]
toArray()

Implements com.amazon.ion.IonSequence.toArray.

Returns an array containing all of the elements in this sequence in proper order.

public <T> T[]
toArray(T[]
the array into which the elements of this sequence are to be stored, if it is big enough; otherwise, a new array of the same runtime type is allocated for this purpose.
a
)

Implements com.amazon.ion.IonSequence.toArray.

Returns an array containing all of the elements in this sequence in proper order; the runtime type of the returned array is that of the specified array.

Inherited from com.amazon.ion.impl.lite.IonContainerLite:
acceptaddadd_childafterIteratorRemovebeforeIteratorRemovecleardeepCloneforceMaterializationOfLazyStategetget_childget_child_countgetContextContainergetContextForIndexgetContextSymbolTablegetSysteminitialSizeisEmptyiteratorlistIteratorlistIteratormake_initial_size_arraymake_next_size_arraymakeNullnextSizepatch_elements_helperremoveremove_childscalarHashCodeset_childsizetransitionToLargeSizevalidateNewChildwriteBodyTo