case class IteratorParserInput[Elem, Repr](data: Iterator[Repr])(implicit repr: ReprOps[Elem, Repr], converter: ReprOps[Elem, Repr], ct: ClassTag[Elem]) extends ParserInput[Elem, Repr] with Product with Serializable
Contains buffer - queue of elements that extends from given iterator when particular elements are requested;
and shrinks by calling dropBuffer method.
Generally, at any specific time this buffer contains "suffix" of given iterator,
e.g. some piece of data from past calls of next, which extends by requesting new batches from iterator.
Therefore we can denote the same notation of indices as for regular Array or more abstract IndexedSeq.
The only difference is when index doesn't fit into the bounds of current buffer
either the new batches are requested to extend the buffer, either it's inaccessible at all,
so calling of dropBuffer should guarantee that there won't be any attempts to access to the elements in dropped part of input.
- Alphabetic
- By Inheritance
- IteratorParserInput
- Serializable
- Product
- Equals
- ParserInput
- IsReachable
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##(): Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def apply(index: Int): Elem
Requests batches until given
indexand in case of success returns needed element.Requests batches until given
indexand in case of success returns needed element.- Definition Classes
- IteratorParserInput → ParserInput → IsReachable
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def checkTraceable(): Nothing
- Definition Classes
- IteratorParserInput → ParserInput
- def clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- val data: Iterator[Repr]
- def dropBuffer(index: Int): Unit
Drops all elements before index not inclusive.
Drops all elements before index not inclusive.
- Definition Classes
- IteratorParserInput → ParserInput
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def innerLength: Int
- returns
Length of the internal buffer.
- Definition Classes
- IteratorParserInput → ParserInput
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def isReachable(index: Int): Boolean
Requests batches until index of last retrieved element is less than
indexand, when it's possible, returns true, otherwise false.Requests batches until index of last retrieved element is less than
indexand, when it's possible, returns true, otherwise false.- Definition Classes
- IteratorParserInput → ParserInput → IsReachable
- def length: Int
- returns
Index of the last element which buffer contains.
- Definition Classes
- IteratorParserInput → ParserInput
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- def productElementNames: Iterator[String]
- Definition Classes
- Product
- implicit val repr: ReprOps[Elem, Repr]
- Definition Classes
- IteratorParserInput → ParserInput
- def slice(from: Int, until: Int): Repr
Also requests batches to the
until.Also requests batches to the
until. If the current buffer is too small to provide some part of data afterfrombound, lower bound of slice is cut to the minimum offromand first index of accessible element in the buffer.- returns
Slice of internal data. For
IndexedSeqmode it works as regular slice, ifuntilovershoots the end of input, it just ignores it and behaves likeuntilequals to the length of input. Same forIteratormode, but it requests batches while the index of last retrieved element is less thanuntiland ifuntilis farther away than any element, it ignores this too.
- Definition Classes
- IteratorParserInput → ParserInput
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()