com.nicta.scoobi.core

Iterable1

Related Docs: object Iterable1 | package core

trait Iterable1[+A] extends AnyRef

A non-empty iterable contains at least one element. Consequences include:

- reduceLeft will always produce a value. - head will always produce a value. - tail will always produce a value.

Some operations on a non-empty iterable result in a non-empty iterable.

Construction of an Iterable1 is typically performed with the +:: method, defined on Iterable1.RichIterator.

For example:

import Iterable1._

// A regular iterator.
val x: Iterable[Int] = ...
// Constructs a non-empty iterable with 74 at the head.
val y: Iterable1[Int] = 74 +:: x
Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Iterable1
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Abstract Value Members

  1. abstract val head: A

  2. abstract val tail: Iterable[A]

Concrete Value Members

  1. final def !=(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Definition Classes
    AnyRef → Any
  3. def ++[AA >: A](that: ⇒ Iterable1[AA]): Iterable1[AA]

    Append the given iterable to this iterable.

  4. def /:[B](b: B)(op: (B, A) ⇒ B): B

    Reduce the iterable using the given seed and loop function.

    Reduce the iterable using the given seed and loop function. Synonym for foldLeft.

  5. def <*>:[B](f: Iterable1[(A) ⇒ B]): Iterable1[B]

    Runs the iterable sequence effect (flatMap) of functions on this iterable.

    Runs the iterable sequence effect (flatMap) of functions on this iterable. Synonym for ap.

  6. final def ==(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  7. def ap[B](f: Iterable1[(A) ⇒ B]): Iterable1[B]

    Runs the iterable sequence effect (flatMap) of functions on this iterable.

    Runs the iterable sequence effect (flatMap) of functions on this iterable. Synonym for <*>:.

  8. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  9. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  10. def collectFirst[B](pf: PartialFunction[A, B]): Option[B]

    Return the first element in the iterable satisfying the given predicate, mapping the given function.

  11. def count(p: (A) ⇒ Boolean): Int

    Return the number of elements satisfying the given predicate.

  12. def drop(n: Int): Iterable[A]

    Drop at most the given number of elements from the front of the iterable.

  13. def dropWhile(p: (A) ⇒ Boolean): Iterable[A]

    Drop elements from the front of the iterable satisfying the given predicate.

  14. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  15. def equals(a: Any): Boolean

    Definition Classes
    Iterable1 → AnyRef → Any
  16. def exists(p: (A) ⇒ Boolean): Boolean

    True if any elements of the iterable satisfy the given predicate.

  17. def filter(p: (A) ⇒ Boolean): Iterable[A]

    Return an iterable with only the elements satisfying the predicate.

  18. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  19. def find(p: (A) ⇒ Boolean): Option[A]

    Return the first element in the iterable satisfying the given predicate.

  20. def flatMap[B](f: (A) ⇒ Iterable1[B]): Iterable1[B]

    Sequence an iterable function on all elements of the iterable.

  21. def flatten[I](implicit I1: (A) ⇒ Iterable1[I]): Iterable1[I]

    Flatten an iterable of iterable.

  22. def foldLeft[B](b: B)(op: (B, A) ⇒ B): B

    Reduce the iterable using the given seed and loop function.

    Reduce the iterable using the given seed and loop function. Synonym for /:.

  23. def forall(p: (A) ⇒ Boolean): Boolean

    True if all elements of the iterable satisfy the given predicate.

  24. def foreach[U](f: (A) ⇒ U): Unit

    Execute the given effect on each element of the iterable.

  25. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  26. def hashCode(): Int

    Definition Classes
    Iterable1 → AnyRef → Any
  27. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  28. def iterator: Iterator1[A]

    Return a non-empty iterator.

  29. def map[B](f: (A) ⇒ B): Iterable1[B]

    Map a function on all elements of the iterable.

  30. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  31. final def notify(): Unit

    Definition Classes
    AnyRef
  32. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  33. def partition(p: (A) ⇒ Boolean): BreakIterable1[A]

    Partition the iterable into those satisfying a predicate and those that do not.

  34. def reduceLeft[AA >: A](op: (AA, A) ⇒ AA): AA

    Reduce the iterable seeded with the head and the loop function on the tail.

  35. def scanLeft[B](z: B)(op: (B, A) ⇒ B): Iterable1[B]

    Produces an iterable containing cumulative results of applying the operator going left to right.

  36. def scanLeft1[AA >: A](op: (AA, A) ⇒ AA): Iterable1[AA]

    Produces an iterable containing cumulative results of applying the operator going left to right, starting at head.

  37. def sequenceFn[X, Y](implicit I: (A) ⇒ (X) ⇒ Y): (X) ⇒ Iterable1[Y]

    Runs the iterable of functions to produce a function to iterables.

  38. def size: Int

    The number of element in the iterable.

  39. def slice(from: Int, to: Int): Iterable[A]

    Returns an interval of elements in the iterable.

  40. def span(p: (A) ⇒ Boolean): BreakIterable1[A]

    Split the iterable, taking from the front while the given predicate satisfies.

  41. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  42. def take(n: Int): Iterable[A]

    Take at most the given number of elements from the front of the iterable.

  43. def takeWhile(p: (A) ⇒ Boolean): Iterable[A]

    Take elements from the front of the iterable satisfying the given predicate.

  44. def toIterable: Iterable[A]

    Return a regular iterable, losing the non-empty invariant in the type.

  45. def toList: List[A]

    Convert this iterable to a list.

  46. def toSeq: Seq[A]

    Convert this iterable to a seq.

  47. def toStream: Stream[A]

    Convert this iterable to a stream.

  48. def toString(): String

    Definition Classes
    Iterable1 → AnyRef → Any
  49. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  50. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  51. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  52. def zip[B](b: Iterable1[B]): Iterable1[(A, B)]

    Zip this iterable with the given iterable to produce an iterable of pairs.

  53. def zipAll[B, AA >: A, BB >: B](that: Iterable1[B], thisElem: AA, thatElem: BB): Iterable1[(AA, BB)]

    Creates an iterable formed from this iterable and another iterable by combining corresponding elements in pairs.

  54. def zipWithIndex: Iterable1[(A, Int)]

    Zip this iterable with the infinite iterable from 0 incrementing by 1, to produce an iterable of pairs.

Inherited from AnyRef

Inherited from Any

Ungrouped