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

pack-priv final Class IonListLite

extends IonSequenceLite
implements IonList
Class Inheritance
All Implemented Interfaces
com.amazon.ion.IonList, java.util.Collection, java.lang.Iterable, com.amazon.ion.IonSequence, java.util.List, java.util.SequencedCollection, com.amazon.ion.IonContainer, com.amazon.ion.IonValue, java.lang.Cloneable
Imports
com.amazon.ion.ContainedValueException, .IonList, .IonType, .IonValue, .ValueVisitor, java.util.Collection

Field Summary

Modifier and TypeField and Description
private static final int
Inherited from com.amazon.ion.impl.lite.IonSequenceLite:
EMPTY_VALUE_ARRAY

Constructor Summary

AccessConstructor and Description
pack-priv
IonListLite(ContainerlessContext context, boolean
indicates whether this should be null.list (if true) or an empty sequence (if false).
makeNull
)

Constructs a null or empty list.

pack-priv
IonListLite(IonListLite existing, IonContext context)

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

Constructs a list value

Method Summary

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

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

Implements com.amazon.ion.IonValue.accept.

Entry point for visitor pattern.

public IonListLite
public IonType
pack-priv int
pack-priv IonValueLite
shallowClone(IonContext
the context applicable to the value's parent.
context
)

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

Clones the value's annotations and field name (if any).

Inherited from com.amazon.ion.impl.lite.IonSequenceLite:
addaddaddaddaddAlladdAllcontainscontainsAllextractindexOflastIndexOfremoveremoveremoveAllretainAllsetsubListtoArraytoArray

Field Detail

HASH_SIGNATUREback to summary
private static final int HASH_SIGNATURE

Constructor Detail

IonListLiteback to summary
pack-priv IonListLite(ContainerlessContext context, boolean makeNull)

Constructs a null or empty list.

Parameters
makeNull:boolean

indicates whether this should be null.list (if true) or an empty sequence (if false).

IonListLiteback to summary
pack-priv IonListLite(IonListLite existing, IonContext context)
IonListLiteback to summary
pack-priv IonListLite(ContainerlessContext context, Collection<? extends IonValue> elements) throws ContainedValueException

Constructs a list value

Parameters
elements:Collection<? extends IonValue>

the initial set of child elements. If null, then the new instance will have isNullValue() == true.

Exceptions
ContainedValueException:
if any value in elements has IonValue#getContainer() != null.

Method Detail

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

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

Implements com.amazon.ion.IonValue.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.
cloneback to summary
public IonListLite clone()

Overrides com.amazon.ion.impl.lite.IonSequenceLite.clone.

Implements com.amazon.ion.IonList.clone, com.amazon.ion.IonSequence.clone, 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:IonListLite

Doc from java.lang.Object.clone.

a clone of this instance.

Annotations
@Override
getTypeSlowback to summary
public IonType getTypeSlow()

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

Returns:IonType

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

the value's type.

Annotations
@Override
hashSignatureback to summary
pack-priv int hashSignature()

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

Returns:int

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

the constant hash signature unique to the value's type.

Annotations
@Override
shallowCloneback to summary
pack-priv IonValueLite shallowClone(IonContext context)

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

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

Clones the value's annotations and field name (if any). For scalars, also clones the value. For containers, leaves the cloned container empty rather than cloning the children.

Parameters
context:IonContext

the context applicable to the value's parent.

Returns:IonValueLite

a shallow clone of this value.

Annotations
@Override