as
as
Works like apply(), unsafe, bare return of a value. Returns default if nothing matching is found, else tries to cast a value to the specified type.
Unless you overrode it, default throws a NoSuchElementException
(Int)
(A)
A utility method that allows you to cast a value to an Option[A]
A utility method that allows you to cast a value to an Option[A]
Some(value.asInstanceOf[T]) would only cause a runtime ClassCastException when calling get
This utility ensures that the types match correctly (even boxed scala types eg Int) so we can check against the type and return Some(value) if the types match.
the type to cast to check against
the value to type check against
Option[A] - Some(value) if the type of instances match else None
Lazy utility method to allow typing without conflicting with Map's required get() method and causing ambiguity
(Changed in version 2.9.0) The behavior of scanRight
has changed. The previous behavior can be reproduced with scanRight.reverse.
(Changed in version 2.9.0) transpose
throws an IllegalArgumentException
if collections are not uniformly sized.