fastparse.utils

IteratorParserInput

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.

Linear Supertypes
Serializable, Serializable, Product, Equals, ParserInput[Elem, Repr], IsReachable[Elem], AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. IteratorParserInput
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. ParserInput
  7. IsReachable
  8. AnyRef
  9. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new IteratorParserInput(data: Iterator[Repr])(implicit repr: ReprOps[Elem, Repr], converter: ReprOps[Elem, Repr], ct: ClassTag[Elem])

Value Members

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

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

    Definition Classes
    AnyRef → Any
  4. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. 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
    IteratorParserInputParserInputIsReachable
  7. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  8. def checkTraceable(): Nothing

    Definition Classes
    IteratorParserInputParserInput
  9. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  10. val data: Iterator[Repr]

  11. def dropBuffer(index: Int): Unit

    Drops all elements before index not inclusive.

    Drops all elements before index not inclusive.

    Definition Classes
    IteratorParserInputParserInput
  12. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  13. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  14. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  15. def innerLength: Int

    returns

    Length of the internal buffer.

    Definition Classes
    IteratorParserInputParserInput
  16. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  17. 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
    IteratorParserInputParserInputIsReachable
  18. def length: Int

    returns

    Index of the last element which buffer contains.

    Definition Classes
    IteratorParserInputParserInput
  19. final def ne(arg0: AnyRef): Boolean

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

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

    Definition Classes
    AnyRef
  22. implicit val repr: ReprOps[Elem, Repr]

    Definition Classes
    IteratorParserInputParserInput
  23. 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 after from bound, lower bound of slice is cut to the minimum of from and first index of accessible element in the buffer.

    returns

    Slice of internal data. For IndexedSeq mode it works as regular slice, if until overshoots the end of input, it just ignores it and behaves like until equals to the length of input. Same for Iterator mode, but it requests batches while the index of last retrieved element is less than until and if until is farther away than any element, it ignores this too.

    Definition Classes
    IteratorParserInputParserInput
  24. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  25. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from ParserInput[Elem, Repr]

Inherited from IsReachable[Elem]

Inherited from AnyRef

Inherited from Any

Ungrouped