IterableOnceExtension
flatgraph.traversal.IterableOnceExtension
final class IterableOnceExtension[A](val iterable: IterableOnce[A]) extends AnyVal
Attributes
- Graph
-
- Supertypes
-
class AnyValtrait Matchableclass Any
Members list
Value members
Concrete methods
Attributes
- See also
-
loneElement(hint)
Attributes
- Returns
-
the one and only element from an Iterable
- Throws
-
AssertionError
if the Iterable has more than one element
NoSuchElementExceptionif the Iterable is empty
Attributes
- Returns
-
Some(element)if the Iterable has exactly one element, or
Noneif the Iterable has zero or more than 1 element. Note: if the lone element is
null, this will return
Some(null), which is in accordance with how
headOptionworks.
Concrete fields
In this article