A sequence with exactly one element, which may be null.
Initializer |
Singleton(Element element) |
Attributes | |
clone | Source Code Returns a Refined declaration: clone |
coalesced | Source Code shared actual {<Element&Object>*} coalesced Returns the Singleton itself, or empty Refined declaration: coalesced |
first | Source Code shared actual Element first Returns the element contained in this Refined declaration: first |
hash | Source Code shared actual Integer hash The hash value of the value, which allows the value
to be an element of a hash-based set or key of a
hash-based map. Implementations must respect the
constraint that if Refined declaration: hash |
last | Source Code shared actual Element last Returns the element contained in this Refined declaration: last |
lastIndex | Source Code shared actual Integer lastIndex Returns Refined declaration: lastIndex |
rest | Source Code shared actual [] rest Returns Refined declaration: rest |
reversed | Source Code Return this singleton. Refined declaration: reversed |
size | Source Code shared actual Integer size Returns Refined declaration: size |
string | Source Code shared actual String string A developer-friendly string representing the
instance. Concatenates the name of the concrete
class of the instance with the Refined declaration: string |
Inherited Attributes |
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+] |
Attributes inherited from: Element[] |
Methods | |
any | Source Code Return Refined declaration: any |
contains | Source Code Returns Refined declaration: contains |
count | Source Code Returns Refined declaration: count |
equals | Source Code A Refined declaration: equals |
every | Source Code Return Refined declaration: every |
filter | Source Code An Refined declaration: filter |
find | Source Code The first element which satisfies the given
predicate, if any, or Refined declaration: find |
findLast | Source Code The last element which satisfies the given
predicate, if any, or Refined declaration: findLast |
fold | Source Code shared actual Result fold<Result>(Result initial, Result accumulating(Result partial, Element e)) The result of applying the accumulating function to each element of this container in turn. Refined declaration: fold |
get | Source Code Returns the contained element, if the specified
index is Refined declaration: get |
iterator | Source Code An iterator for the elements belonging to this container. Refined declaration: iterator |
map | Source Code An Refined declaration: map |
segment | Source Code Returns a Refined declaration: segment |
skipping | Source Code Produce an Refined declaration: skipping |
sort | Source Code A sequence containing the elements of this container, sorted according to a function imposing a partial order upon the elements. For convenience, the functions "Hello World!".sort(byIncreasing((Character c) => c.lowercased)) This operation is eager by nature. Refined declaration: sort |
span | Source Code Returns a Refined declaration: span |
spanFrom | Source Code Obtain a span containing the mapped values between the starting index and the end of the receiver. Refined declaration: spanFrom |
spanTo | Source Code Obtain a span containing the mapped values between the start of the receiver and the end index. Refined declaration: spanTo |
taking | Source Code Produce an Refined declaration: taking |
Inherited Methods |
Methods inherited from: Category |
Methods inherited from: Correspondence<Key,Item> |
Methods inherited from: Iterable<Element,Absent> any, by, chain, collect, count, cycle, defaultNullElements, every, filter, find, findLast, fold, following, iterator, longerThan, map, repeat, select, shorterThan, skipping, skippingWhile, sort, taking, takingWhile |
Methods inherited from: List<Element> |
Methods inherited from: Ranged<Index,Span> |