Class/Object

com.rocketfuel.sdbc.base

CloseableIterator

Related Docs: object CloseableIterator | package base

Permalink

class CloseableIterator[+A] extends TraversableOnce[A] with AutoCloseable

CloseableIterator has a similar interface to scala.collection.Iterator, but also is Closeable, and combinators return CloseableIterators.

The iterator will close itself when you get the last value, but otherwise you'll want to close it manually. For instance, calls to drop and take return a CloseableIterator, but it won't close itself when you fully consume it unless it also happens to fully consume the original iterator.

Linear Supertypes
AutoCloseable, TraversableOnce[A], GenTraversableOnce[A], AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. CloseableIterator
  2. AutoCloseable
  3. TraversableOnce
  4. GenTraversableOnce
  5. AnyRef
  6. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new CloseableIterator(original: Iterator[A], resource: AutoCloseable)

    Permalink

Value Members

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

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

    Permalink
    Definition Classes
    AnyRef → Any
  3. def /:[B](z: B)(op: (B, A) ⇒ B): B

    Permalink
    Definition Classes
    TraversableOnce → GenTraversableOnce
  4. def :\[B](z: B)(op: (A, B) ⇒ B): B

    Permalink
    Definition Classes
    TraversableOnce → GenTraversableOnce
  5. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  6. def addString(b: StringBuilder): StringBuilder

    Permalink
    Definition Classes
    TraversableOnce
  7. def addString(b: StringBuilder, sep: String): StringBuilder

    Permalink
    Definition Classes
    TraversableOnce
  8. def addString(b: StringBuilder, start: String, sep: String, end: String): StringBuilder

    Permalink
    Definition Classes
    TraversableOnce
  9. def aggregate[B](z: ⇒ B)(seqop: (B, A) ⇒ B, combop: (B, B) ⇒ B): B

    Permalink
    Definition Classes
    TraversableOnce → GenTraversableOnce
  10. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  11. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  12. def close(): Unit

    Permalink
    Definition Classes
    CloseableIterator → AutoCloseable
  13. def collect[B](pf: PartialFunction[A, B]): CloseableIterator[B]

    Permalink

    Note

    Reuse: If you fully consume the resulting iterator, the resource will be closed.

  14. def collectFirst[B](pf: PartialFunction[A, B]): Option[B]

    Permalink
    Definition Classes
    TraversableOnce
  15. def copyToArray[B >: A](xs: Array[B], start: Int, len: Int): Unit

    Permalink

    Definition Classes
    CloseableIterator → TraversableOnce → GenTraversableOnce
    Note

    Reuse: This method might not consume the iterator, and so you should close it manually.

  16. def copyToArray[B >: A](xs: Array[B]): Unit

    Permalink
    Definition Classes
    TraversableOnce → GenTraversableOnce
  17. def copyToArray[B >: A](xs: Array[B], start: Int): Unit

    Permalink
    Definition Classes
    TraversableOnce → GenTraversableOnce
  18. def copyToBuffer[B >: A](dest: Buffer[B]): Unit

    Permalink
    Definition Classes
    TraversableOnce
  19. def corresponds[B](that: CloseableIterator[B])(p: (A, B) ⇒ Boolean): Boolean

    Permalink

    Note

    Reuse: This method might not consume the iterator, and so you should close it manually.

  20. def corresponds[B](that: GenTraversableOnce[B])(p: (A, B) ⇒ Boolean): Boolean

    Permalink

    Note

    Reuse: This method might not consume the iterator, and so you should close it manually.

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

    Permalink
    Definition Classes
    TraversableOnce → GenTraversableOnce
  22. def drop(n: Int): CloseableIterator[A]

    Permalink

    Note

    Reuse: If you fully consume the resulting iterator, the resource will be closed.

  23. def dropWhile(p: (A) ⇒ Boolean): CloseableIterator[A]

    Permalink

    Note

    Reuse: If you fully consume the resulting iterator, the resource will be closed.

  24. def duplicate: (CloseableIterator[A], CloseableIterator[A])

    Permalink

    Note

    Reuse: If you fully consume the resulting iterator, the resource will be closed.

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

    Permalink
    Definition Classes
    AnyRef
  26. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  27. def exists(p: (A) ⇒ Boolean): Boolean

    Permalink

    Definition Classes
    CloseableIterator → TraversableOnce → GenTraversableOnce
    Note

    Reuse: This method might not consume the iterator, and so you should close it manually.

  28. def filter(p: (A) ⇒ Boolean): CloseableIterator[A]

    Permalink

    Note

    Reuse: If you fully consume the resulting iterator, the resource will be closed.

  29. def filterNot(p: (A) ⇒ Boolean): CloseableIterator[A]

    Permalink

    Note

    Reuse: If you fully consume the resulting iterator, the resource will be closed.

  30. def finalize(): Unit

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

    Permalink

    Definition Classes
    CloseableIterator → TraversableOnce → GenTraversableOnce
    Note

    Reuse: This method might not consume the iterator, and so you should close it manually.

  32. def flatMap[B](f: (A) ⇒ GenTraversableOnce[B]): CloseableIterator[B]

    Permalink

    Note

    Reuse: If you fully consume the resulting iterator, the resource will be closed.

  33. def fold[A1 >: A](z: A1)(op: (A1, A1) ⇒ A1): A1

    Permalink
    Definition Classes
    TraversableOnce → GenTraversableOnce
  34. def foldLeft[B](z: B)(op: (B, A) ⇒ B): B

    Permalink
    Definition Classes
    TraversableOnce → GenTraversableOnce
  35. def foldRight[B](z: B)(op: (A, B) ⇒ B): B

    Permalink
    Definition Classes
    TraversableOnce → GenTraversableOnce
  36. def forall(p: (A) ⇒ Boolean): Boolean

    Permalink

    Definition Classes
    CloseableIterator → TraversableOnce → GenTraversableOnce
    Note

    Reuse: This method might not consume the iterator, and so you should close it manually.

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

    Permalink

    Definition Classes
    CloseableIterator → TraversableOnce → GenTraversableOnce
    Note

    Reuse: This method fully consumes the iterator, and so it closes itself.

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

    Permalink
    Definition Classes
    AnyRef → Any
  39. def grouped[B >: A](size: Int): CloseableIterator[Seq[B]]

    Permalink

    Note

    Reuse: If you fully consume the resulting iterator, the resource will be closed.

  40. def hasDefiniteSize: Boolean

    Permalink
    Definition Classes
    CloseableIterator → TraversableOnce → GenTraversableOnce
  41. def hasNext: Boolean

    Permalink
  42. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  43. def isEmpty: Boolean

    Permalink
    Definition Classes
    CloseableIterator → TraversableOnce → GenTraversableOnce
  44. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  45. def isTraversableAgain: Boolean

    Permalink
    Definition Classes
    CloseableIterator → GenTraversableOnce
  46. def length: Int

    Permalink

    Note

    Reuse: This method fully consumes the iterator, and so it closes itself.

  47. def map[B](f: (A) ⇒ B): CloseableIterator[B]

    Permalink
  48. def max[B >: A](implicit cmp: Ordering[B]): A

    Permalink
    Definition Classes
    TraversableOnce → GenTraversableOnce
  49. def maxBy[B](f: (A) ⇒ B)(implicit cmp: Ordering[B]): A

    Permalink
    Definition Classes
    TraversableOnce → GenTraversableOnce
  50. def min[B >: A](implicit cmp: Ordering[B]): A

    Permalink
    Definition Classes
    TraversableOnce → GenTraversableOnce
  51. def minBy[B](f: (A) ⇒ B)(implicit cmp: Ordering[B]): A

    Permalink
    Definition Classes
    TraversableOnce → GenTraversableOnce
  52. def mkString: String

    Permalink
    Definition Classes
    TraversableOnce → GenTraversableOnce
  53. def mkString(sep: String): String

    Permalink
    Definition Classes
    TraversableOnce → GenTraversableOnce
  54. def mkString(start: String, sep: String, end: String): String

    Permalink
    Definition Classes
    TraversableOnce → GenTraversableOnce
  55. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  56. def next(): A

    Permalink
  57. def nextOption(): Option[A]

    Permalink
  58. def nonEmpty: Boolean

    Permalink
    Definition Classes
    TraversableOnce → GenTraversableOnce
  59. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  60. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  61. def product[B >: A](implicit num: Numeric[B]): B

    Permalink
    Definition Classes
    TraversableOnce → GenTraversableOnce
  62. def reduce[A1 >: A](op: (A1, A1) ⇒ A1): A1

    Permalink
    Definition Classes
    TraversableOnce → GenTraversableOnce
  63. def reduceLeft[B >: A](op: (B, A) ⇒ B): B

    Permalink
    Definition Classes
    TraversableOnce
  64. def reduceLeftOption[B >: A](op: (B, A) ⇒ B): Option[B]

    Permalink
    Definition Classes
    TraversableOnce → GenTraversableOnce
  65. def reduceOption[A1 >: A](op: (A1, A1) ⇒ A1): Option[A1]

    Permalink
    Definition Classes
    TraversableOnce → GenTraversableOnce
  66. def reduceRight[B >: A](op: (A, B) ⇒ B): B

    Permalink
    Definition Classes
    TraversableOnce → GenTraversableOnce
  67. def reduceRightOption[B >: A](op: (A, B) ⇒ B): Option[B]

    Permalink
    Definition Classes
    TraversableOnce → GenTraversableOnce
  68. def reversed: List[A]

    Permalink
    Attributes
    protected[this]
    Definition Classes
    TraversableOnce
  69. def sameElements(that: CloseableIterator[_]): Boolean

    Permalink

    Note

    Reuse: This method might not consume the iterator, and so you should close it manually.

  70. def sameElements(that: Iterator[_]): Boolean

    Permalink

    Note

    Reuse: This method might not consume the iterator, and so you should close it manually.

  71. def scanLeft[B](z: B)(op: (B, A) ⇒ B): CloseableIterator[B]

    Permalink

    Note

    Reuse: If you fully consume the resulting iterator, the resource will be closed.

  72. def seq: TraversableOnce[A]

    Permalink
    Definition Classes
    CloseableIterator → TraversableOnce → GenTraversableOnce
  73. def size: Int

    Permalink

    Definition Classes
    CloseableIterator → TraversableOnce → GenTraversableOnce
    Note

    Reuse: This method fully consumes the iterator, and so it closes itself.

  74. def slice(from: Int, until: Int): CloseableIterator[A]

    Permalink

    Note

    Reuse: If you fully consume the resulting iterator, the resource might not be closed, and so you should close it manually.

  75. def sliding[B >: A](size: Int, step: Int = 1): CloseableIterator[Seq[B]]

    Permalink

    Note

    Reuse: If you fully consume the resulting iterator, the resource will be closed.

  76. def span(p: (A) ⇒ Boolean): (CloseableIterator[A], CloseableIterator[A])

    Permalink

    Note

    Consuming the first iterator might close the resource. If not, the second will.

  77. def sum[B >: A](implicit num: Numeric[B]): B

    Permalink
    Definition Classes
    TraversableOnce → GenTraversableOnce
  78. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  79. def take(n: Int): CloseableIterator[A]

    Permalink

    Note

    Reuse: If you fully consume the resulting iterator, the resource might not be closed, and so you should close it manually.

  80. def takeWhile(p: (A) ⇒ Boolean): CloseableIterator[A]

    Permalink

    Note

    Reuse: If you fully consume the resulting iterator, the resource might not be closed, and so you should close it manually.

  81. def to[Col[_]](implicit cbf: CanBuildFrom[Nothing, A, Col[A]]): Col[A]

    Permalink
    Definition Classes
    TraversableOnce → GenTraversableOnce
  82. def toArray[B >: A](implicit arg0: ClassTag[B]): Array[B]

    Permalink
    Definition Classes
    TraversableOnce → GenTraversableOnce
  83. def toBuffer[B >: A]: Buffer[B]

    Permalink
    Definition Classes
    TraversableOnce → GenTraversableOnce
  84. def toIndexedSeq: IndexedSeq[A]

    Permalink
    Definition Classes
    TraversableOnce → GenTraversableOnce
  85. def toIterable: Iterable[A]

    Permalink
    Definition Classes
    TraversableOnce → GenTraversableOnce
  86. lazy val toIterator: Iterator[A]

    Permalink

    Use this iterator wherever you need a scala.Iterator.

    Use this iterator wherever you need a scala.Iterator. You lose the ability to close the resource manually, but if the iterator is consumed it will still close itself.

    Definition Classes
    CloseableIterator → GenTraversableOnce
  87. def toList: List[A]

    Permalink
    Definition Classes
    TraversableOnce → GenTraversableOnce
  88. def toMap[T, U](implicit ev: <:<[A, (T, U)]): Map[T, U]

    Permalink
    Definition Classes
    TraversableOnce → GenTraversableOnce
  89. def toSeq: Seq[A]

    Permalink
    Definition Classes
    TraversableOnce → GenTraversableOnce
  90. def toSet[B >: A]: Set[B]

    Permalink
    Definition Classes
    TraversableOnce → GenTraversableOnce
  91. def toStream: Stream[A]

    Permalink
    Definition Classes
    CloseableIterator → GenTraversableOnce
  92. def toString(): String

    Permalink
    Definition Classes
    CloseableIterator → AnyRef → Any
  93. def toTraversable: Traversable[A]

    Permalink
    Definition Classes
    CloseableIterator → TraversableOnce → GenTraversableOnce
  94. def toVector: Vector[A]

    Permalink
    Definition Classes
    TraversableOnce → GenTraversableOnce
  95. final def wait(): Unit

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  98. def zip[B](that: Iterator[B]): CloseableIterator[(A, B)]

    Permalink

    Note

    Reuse: If you fully consume the resulting iterator, the resource might not be closed, and so you should close it manually.

  99. def zip[B](that: CloseableIterator[B]): CloseableIterator[(A, B)]

    Permalink

    Note

    Reuse: If you fully consume the resulting iterator, the resource might not be closed, and so you should close it manually.

  100. def zipAll[B, A1 >: A, B1 >: B](that: CloseableIterator[B], thisElem: A1, thatElem: B1): CloseableIterator[(A1, B1)]

    Permalink

    Note

    Reuse: If you fully consume the resulting iterator, the resource will be closed.

  101. def zipAll[B, A1 >: A, B1 >: B](that: Iterator[B], thisElem: A1, thatElem: B1): CloseableIterator[(A1, B1)]

    Permalink

    Note

    Reuse: If you fully consume the resulting iterator, the resource will be closed.

  102. def zipWithIndex: CloseableIterator[(A, Int)]

    Permalink

    Note

    Reuse: If you fully consume the resulting iterator, the resource will be closed.

Inherited from AutoCloseable

Inherited from TraversableOnce[A]

Inherited from GenTraversableOnce[A]

Inherited from AnyRef

Inherited from Any

Ungrouped