Satisfied Interfaces: Category, Cloneable<Clone>, Collection<Element>, Container, ContainerWithFirstElement<Element,Null>, Correspondence<Key,Item>, FixedSized<Element>, Iterable<Element>, List<Element>, None<Element>, Ranged<Index,Span>, Sized

A sequence with no elements. The type of the expression {}.

See also: Sequence<Element>
Attributes
cloneSource Code
shared actual Empty clone

Returns an Empty.

coalescedSource Code
shared actual Empty coalesced

The non-null elements of this Iterable, in their original order. For null elements of the original Iterable, there is no entry in the resulting iterable object.

firstSource Code
shared actual Nothing first

The first element. Should produce null if the container is empty, that is, for any instance for which empty evaluates to true.

iteratorSource Code
shared actual Iterator<Element> iterator

Returns an iterator that is already exhausted.

lastSource Code
shared actual Nothing last

The last element. Should produce null if the container is empty, that is, for any instance for which empty evaluates to true.

lastIndexSource Code
shared actual Nothing lastIndex

Returns null.

reversedSource Code
shared actual Empty reversed

Returns an Empty.

sequenceSource Code
shared actual Empty sequence

Returns an Empty.

sizeSource Code
shared actual Integer size

Returns 0.

stringSource Code
shared actual String string

Returns a string description of the empty List: {}.

Inherited Attributes
Attributes inherited from: Object
Attributes inherited from: Cloneable<Clone>
Attributes inherited from: Object
Attributes inherited from: Container
Attributes inherited from: ContainerWithFirstElement<Element,Null>
Attributes inherited from: Correspondence<Key,Item>
Attributes inherited from: Iterable<Element>
Attributes inherited from: List<Element>
Attributes inherited from: Sized
Methods
anySource Code
shared actual Boolean any(Boolean selecting(Bottom element))

Return true if at least one element satisfies the predicate function.

bySource Code
shared actual Empty by(Integer step)

Produce an Iterable containing every stepth element of this iterable object. If the step size is 1, the Iterable contains the same elements as this iterable object. The step size must be greater than zero. The expression

(0..10).by(3)

results in an iterable object with the elements 0, 3, 6, and 9 in that order.

collectSource Code
shared actual Empty collect<Result>(Result collecting(Bottom element))

A sequence containing the results of applying the given mapping to the elements of this container. An eager counterpart to map().

containsSource Code
shared actual Boolean contains(Object element)

Returns false for any given element.

countSource Code
shared actual Integer count(Boolean selecting(Bottom element))

Returns 0 for any given predicate.

definesSource Code
shared actual Boolean defines(Integer index)

Determines if there is a value defined for the given key.

everySource Code
shared actual Boolean every(Boolean selecting(Bottom element))

Return true if all elements satisfy the predicate function.

filterSource Code
shared actual Empty filter(Boolean selecting(Bottom element))

An Iterable containing the elements of this container that satisfy the given predicate.

findSource Code
shared actual Nothing find(Boolean selecting(Bottom element))

The first element which satisfies the given predicate, if any, or null otherwise.

foldSource Code
shared actual Result fold<Result>(Result initial, Result accumulating(Result partial, Bottom element))

The result of applying the accumulating function to each element of this container in turn.

itemSource Code
shared actual Nothing item(Integer index)

Returns null for any given index.

mapSource Code
shared actual Empty map<Result>(Result collecting(Bottom element))

An Iterable containing the results of applying the given mapping to the elements of to this container.

segmentSource Code
shared actual Empty segment(Integer from, Integer length)

Returns an Empty for any given segment.

selectSource Code
shared actual Empty select(Boolean selecting(Bottom element))

A sequence containing the elements of this container that satisfy the given predicate. An eager counterpart to filter().

skippingSource Code
shared actual Empty skipping(Integer skip)

Produce an Iterable containing the elements of this iterable object, after skipping the first skip elements. If this iterable object does not contain more elements than the specified number of elements, the Iterable contains no elements.

sortSource Code
shared actual Empty sort(Comparison? comparing(Bottom a, Bottom b))

A sequence containing the elements of this container, sorted according to a function imposing a partial order upon the elements.

For convenience, the functions byIncreasing() and byDecreasing() produce a suitable comparison function:

"Hello World!".sort(byIncreasing((Character c) c.lowercased))

This operation is eager by nature.

spanSource Code
shared actual Empty span(Integer from, Integer? to)

Returns an Empty for any given span.

takingSource Code
shared actual Empty taking(Integer take)

Produce an Iterable containing the first take elements of this iterable object. If the specified number of elements is larger than the number of elements of this iterable object, the Iterable contains the same elements as this iterable object.

withLeadingSource Code
shared actual Sequence<Element> withLeading<Other>(Other other)

Returns a new List that starts with the specified element, followed by the elements of this List.

withTrailingSource Code
shared actual Sequence<Element> withTrailing<Other>(Other other)

Returns a new List that contains the specified element appended to the end of this Lists' elements.

Inherited Methods
Methods inherited from: Object
Methods inherited from: Category
Methods inherited from: Correspondence<Key,Item>
Methods inherited from: Iterable<Element>
Methods inherited from: Object
Methods inherited from: List<Element>
Methods inherited from: Ranged<Index,Span>