Satisfied Interfaces: Category, Cloneable<[]>, Collection<Element>, Correspondence<Integer,Element>, Iterable<Element,Null>, List<Element>, Ranged<Integer,[]>, Sequential<Nothing>
Direct Known Satisfying Classes: empty

A sequence with no elements. The type Empty may be abbreviated [], and an instance is produced by the expression []. That is, in the following expression, e has type [] and refers to the value []:

[] none = [];

(Whether the syntax [] refers to the type or the value depends upon how it occurs grammatically.)

See also: Sequence
Attributes
cloneSource Code
shared actual [] clone

Returns an Empty.

Refined declaration: clone
coalescedSource Code
shared actual [] coalesced

Returns an Empty.

Refined declaration: coalesced
emptySource Code
shared actual Boolean empty

Returns true.

Refined declaration: empty
firstSource Code
shared actual Null first

Returns null.

Refined declaration: first
indexedSource Code
shared actual [] indexed

Returns an Empty.

Refined declaration: indexed
lastSource Code
shared actual Null last

Returns null.

Refined declaration: last
lastIndexSource Code
shared actual Null lastIndex

Returns null.

Refined declaration: lastIndex
restSource Code
shared actual [] rest

Returns an Empty.

Refined declaration: rest
reversedSource Code
shared actual [] reversed

Returns an Empty.

Refined declaration: reversed
sequenceSource Code
shared actual [] sequence

Returns an Empty.

Refined declaration: sequence
sizeSource Code
shared actual Integer size

Returns 0.

Refined declaration: size
stringSource Code
shared actual String string

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

Refined declaration: string
Inherited Attributes
Attributes inherited from: Object
Attributes inherited from: Cloneable<Clone>
Attributes inherited from: Collection<Element>
Attributes inherited from: Correspondence<Key,Item>
Attributes inherited from: Iterable<Element,Absent>
Attributes inherited from: List<Element>
Attributes inherited from: Element[]
Methods
anySource Code
shared actual Boolean any(Boolean selecting(Nothing element))

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

Refined declaration: any
bySource Code
shared actual [] 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.

Refined declaration: by
chainSource Code
shared actual Iterable<Other,OtherAbsent> chain<Other, OtherAbsent>(Iterable<Other,OtherAbsent> other)
given OtherAbsent satisfies Null

Returns other.

Refined declaration: chain
collectSource Code
shared actual [] collect<Result>(Result collecting(Nothing element))

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

Refined declaration: collect
containsSource Code
shared actual Boolean contains(Object element)

Returns false for any given element.

Refined declaration: contains
countSource Code
shared actual Integer count(Boolean selecting(Nothing element))

Returns 0 for any given predicate.

Refined declaration: count
definesSource Code
shared actual Boolean defines(Integer index)

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

Refined declaration: defines
everySource Code
shared actual Boolean every(Boolean selecting(Nothing element))

Return true if all elements satisfy the predicate function.

Refined declaration: every
filterSource Code
shared actual [] filter(Boolean selecting(Nothing element))

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

Refined declaration: filter
findSource Code
shared actual Null find(Boolean selecting(Nothing element))

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

Refined declaration: find
foldSource Code
shared actual Result fold<Result>(Result initial, Result accumulating(Result partial, Nothing element))

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

Refined declaration: fold
followingSource Code

An Iterable with the given inital element followed by the elements of this iterable object.

Refined declaration: following
getSource Code
shared actual Null get(Integer index)

Returns null for any given index.

Refined declaration: get
iteratorSource Code
shared actual Iterator<Nothing> iterator()

Returns an iterator that is already exhausted.

Refined declaration: iterator
mapSource Code
shared actual [] map<Result>(Result collecting(Nothing element))

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

Refined declaration: map
segmentSource Code
shared actual [] segment(Integer from, Integer length)

Returns an Empty for any given segment.

Refined declaration: segment
selectSource Code
shared actual [] select(Boolean selecting(Nothing element))

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

Refined declaration: select
skippingSource Code
shared actual [] 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.

Refined declaration: skipping
sortSource Code
shared actual [] sort(Comparison comparing(Nothing a, Nothing 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.

Refined declaration: sort
spanSource Code
shared actual [] span(Integer from, Integer to)

Returns an Empty for any given span.

Refined declaration: span
spanFromSource Code
shared actual [] spanFrom(Integer from)

Returns an Empty for any given span.

Refined declaration: spanFrom
spanToSource Code
shared actual [] spanTo(Integer to)

Returns an Empty for any given span.

Refined declaration: spanTo
takingSource Code
shared actual [] 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.

Refined declaration: taking
withLeadingSource Code
shared actual [Element] withLeading<Element>(Element element)

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

Refined declaration: withLeading
withTrailingSource Code
shared actual [Element] withTrailing<Element>(Element element)

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

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