-
- All Implemented Interfaces:
-
com.amazon.ionelement.api.ContainerElement
,com.amazon.ionelement.api.IonElement
public interface SeqElement implements ContainerElement
Represents an ordered collection element such as an Ion list or s-expression.
Includes no additional functionality over ContainerElement, but serves to provide additional type safety when working with ordered collection elements.
See the note about equivalence in the documentation for IonElement.
-
-
Method Summary
Modifier and Type Method Description abstract SeqElement
copy(List<String> annotations, Map<String, Object> metas)
Returns a shallow copy of the current node, replacing the annotations and metas with those specified. abstract SeqElement
withAnnotations(String additionalAnnotations)
Returns a shallow copy of the current node with the specified additional annotations. abstract SeqElement
withAnnotations(Iterable<String> additionalAnnotations)
Returns a shallow copy of the current node with the specified additional annotations. abstract SeqElement
withoutAnnotations()
Returns a shallow copy of the current node with all annotations removed. abstract SeqElement
withMetas(Map<String, Object> additionalMetas)
Returns a shallow copy of the current node with the specified additional metadata, overwriting any metas that already exist with the same keys. abstract SeqElement
withMeta(String key, Object value)
Returns a shallow copy of the current node with the specified additional meta, overwriting any meta that previously existed with the same key. abstract SeqElement
withoutMetas()
Returns a shallow copy of the current node without any metadata. abstract List<AnyElement>
getValues()
Narrows the return type of ContainerElement.values to List. abstract Integer
getSize()
The number of values in this container. abstract ElementType
getType()
The Ion data type of the current node. abstract Map<String, Object>
getMetas()
This IonElement's metadata. abstract List<String>
getAnnotations()
This element's Ion type annotations. abstract Boolean
isNull()
Returns true if the current value is null.null
or any typed null.-
-
Method Detail
-
copy
abstract SeqElement copy(List<String> annotations, Map<String, Object> metas)
Returns a shallow copy of the current node, replacing the annotations and metas with those specified.
-
withAnnotations
abstract SeqElement withAnnotations(String additionalAnnotations)
Returns a shallow copy of the current node with the specified additional annotations.
-
withAnnotations
abstract SeqElement withAnnotations(Iterable<String> additionalAnnotations)
Returns a shallow copy of the current node with the specified additional annotations.
-
withoutAnnotations
abstract SeqElement withoutAnnotations()
Returns a shallow copy of the current node with all annotations removed.
-
withMetas
abstract SeqElement withMetas(Map<String, Object> additionalMetas)
Returns a shallow copy of the current node with the specified additional metadata, overwriting any metas that already exist with the same keys.
-
withMeta
abstract SeqElement withMeta(String key, Object value)
Returns a shallow copy of the current node with the specified additional meta, overwriting any meta that previously existed with the same key.
When adding multiple metas, consider withMetas instead.
-
withoutMetas
abstract SeqElement withoutMetas()
Returns a shallow copy of the current node without any metadata.
-
getValues
abstract List<AnyElement> getValues()
Narrows the return type of ContainerElement.values to List.
-
getType
abstract ElementType getType()
The Ion data type of the current node.
-
getMetas
abstract Map<String, Object> getMetas()
This IonElement's metadata.
-
getAnnotations
abstract List<String> getAnnotations()
This element's Ion type annotations.
-
-
-
-