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
- 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
index
and in case of success returns needed element.Requests batches until given
index
and 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( ... )
- 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[_]
- Definition Classes
- AnyRef → Any
-
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
index
and, when it's possible, returns true, otherwise false.Requests batches until index of last retrieved element is less than
index
and, 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
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
-
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 afterfrom
bound, lower bound of slice is cut to the minimum offrom
and first index of accessible element in the buffer.- returns
Slice of internal data. For
IndexedSeq
mode it works as regular slice, ifuntil
overshoots the end of input, it just ignores it and behaves likeuntil
equals to the length of input. Same forIterator
mode, but it requests batches while the index of last retrieved element is less thanuntil
and ifuntil
is 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( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )