An immutable Map
with no entries.
no subtypes hierarchy
Attributes | |
empty | Source Codeshared actual Boolean empty Determines if the stream is empty, that is to say, if the iterator returns no elements. |
items | Source Codeshared actual Collection<Nothing> items A Refines Map.items |
keys | Source Codeshared actual Collection<Nothing> keys The |
size | Source Codeshared actual Integer size The number of elements returned by the Refines Iterable.size |
Inherited Attributes |
Attributes inherited from: Object |
Attributes inherited from: Collection<Element> |
Attributes inherited from: Correspondence<Key,Item> |
Attributes inherited from: Iterable<Element,Absent> |
Attributes inherited from: Map<Key,Item> |
Methods | |
any | Source Codeshared actual Boolean any(Boolean selecting(Nothing->Nothing element)) Determines if there is at least one element of this
stream that satisfies the given predicate
function. If the stream is empty, returns
Refines Iterable.any |
by | Source Codeshared actual {<Nothing->Nothing>*} by(Integer step) Produces a stream containing every For example, the expression (0..10).by(3) results in the stream The step size must be greater than zero. Refines Iterable.by |
clone | Source Codeshared actual Map<Nothing,Nothing> clone() A shallow copy of this collection, that is, a collection with identical elements which does not change if this collection changes. If this collection is immutable, it is acceptable to return a reference to this collection. If this collection is mutable, a newly instantiated collection must be returned. |
contains | Source Codeshared actual Boolean contains(Object element) Returns For any instance element in c For most
However, it is possible to form a useful |
containsAny | Source Codeshared actual Boolean containsAny({Object*} elements) Returns Refines Category.containsAny |
containsEvery | Source Codeshared actual Boolean containsEvery({Object*} elements) Returns Refines Category.containsEvery |
count | Source Codeshared actual Integer count(Boolean selecting(Nothing->Nothing element)) Produces the number of elements in this stream that satisfy the given predicate function. For an infinite stream, this method never terminates. Refines Iterable.count |
defines | Source Codeshared actual Boolean defines(Object index) Determines if there is a value defined for the given key. |
each | Source Codeshared actual void each(void step(Nothing->Nothing element)) Call the given function for each element of this stream, passing the elements in the order they occur in this stream. For example: words.each((word) { print(word.lowercased); print(word.uppercased); }); Has the same effect as the following for (word in words) { print(word.lowercased); print(word.uppercased); } For certain streams this method is highly efficient,
surpassing the performance of Refines Iterable.each |
every | Source Codeshared actual Boolean every(Boolean selecting(Nothing->Nothing element)) Determines if all elements of this stream satisfy the
given predicate function. If the stream
is empty, return Refines Iterable.every |
find | Source Codeshared actual Null find(Boolean selecting(Nothing->Nothing element)) The first element of this stream which is not null and
satisfies the given predicate function,
if any, or For example, the expression (-10..10).find(Integer.positive) evaluates to Refines Iterable.find |
findLast | Source Codeshared actual Null findLast(Boolean selecting(Nothing->Nothing element)) The last element of this stream which is not null and
satisfies the given predicate function,
if any, or For example, the expression (-10..10).findLast(3.divides) evaluates to Refines Iterable.findLast |
get | Source Codeshared actual Null get(Object key) Returns the value defined for the given key, or For any instance c[key] |
getOrDefault | Source Codeshared actual Default getOrDefault<Default>(Object key, Default default) Returns the item of the entry with the given For maps with non-null items, the expression: map.getOrDefault(key, def) is equivalent to this common idiom: map[key] else def However, when the map has null items, Note that high-quality implementations of Refines Map.getOrDefault |
iterator | Source Codeshared actual Iterator<Nothing->Nothing> iterator() An iterator for the elements belonging to this stream. If this is a nonempty stream with type Refines Iterable.iterator |
mapItems | Source Codeshared actual Map<Nothing,Nothing> mapItems<Result>(Result mapping(Nothing key, Nothing item)) Produces a map with the same Refines Map.mapItems |
skip | Source Codeshared actual {<Nothing->Nothing>*} skip(Integer skipping) Produces a stream containing the elements of this
stream, after skipping the first If this stream does not contain more elements than the specified number of elements to skip, the resulting stream has no elements. If the specified number of elements to skip is zero or fewer, the resulting stream contains the same elements as this stream. Refines Iterable.skip |
take | Source Codeshared actual {<Nothing->Nothing>*} take(Integer taking) Produces a stream containing the first If the specified number of elements to take is larger than the number of elements of this stream, the resulting stream contains the same elements as this stream. If the specified number of elements to take is fewer than one, the resulting stream has no elements. Refines Iterable.take |
Inherited Methods |
Methods inherited from: Object |
Methods inherited from: Category<Element> |
Methods inherited from: Collection<Element> |
Methods inherited from: Correspondence<Key,Item> |
Methods inherited from: Iterable<Element,Absent> any() , by() , chain() , collect() , contains() , count() , defaultNullElements() , each() , every() , filter() , find() , findLast() , flatMap() , fold() , follow() , frequencies() , getFromFirst() , group() , indexes() , interpose() , iterator() , locate() , locateLast() , locations() , longerThan() , map() , max() , narrow() , partition() , product() , reduce() , repeat() , scan() , select() , sequence() , shorterThan() , skip() , skipWhile() , sort() , spread() , summarize() , tabulate() , take() , takeWhile() |
Methods inherited from: Map<Key,Item> |