scala.util.parsing.input

class CharArrayReader

[source: scala/util/parsing/input/CharArrayReader.scala]

class CharArrayReader(source : Array[Char], index : Int, line : Int, column : Int)
extends Reader[Char]
A character array reader reads a stream of characters (keeping track of their positions) from an array.
Parameters
source - an array of characters
index - starting offset into the array; the first element returned will be `source(index)'
line - the line number of the first element (counting from index `0' of `source')
column - the column number of the first element (counting from index `0' of `source')
Author
Martin Odersky, Adriaan Moors
Additional Constructor Summary
def this (source : Array[Char]) : CharArrayReader
Construct a CharArrayReader with its first element at source(0) and position (1,1).
Method Summary
def atEnd : Boolean
Whether there are any more elements in this reader besides the first. (i.e., whether calling `rest' will yield a `Reader' with more elements)
def first : Char
Returns the first element of the stream
def pos : Position
The position of the first element in the stream
def rest : CharArrayReader
Returns an abstract reader consisting of all elements except the first
Methods inherited from AnyRef
getClass, hashCode, equals, clone, toString, notify, notifyAll, wait, wait, wait, finalize, ==, !=, eq, ne, synchronized
Methods inherited from Any
==, !=, isInstanceOf, asInstanceOf
Additional Constructor Details
def this(source : Array[Char]) : CharArrayReader
Construct a CharArrayReader with its first element at source(0) and position (1,1).

Method Details
def first : Char
Returns the first element of the stream
Overrides
Reader.first

def rest : CharArrayReader
Returns an abstract reader consisting of all elements except the first
Returns
If atEnd is true, the result will be this'; otherwise, it's a Reader containing more elements.
Overrides
Reader.rest

def pos : Position
The position of the first element in the stream
Overrides
Reader.pos

def atEnd : Boolean
Whether there are any more elements in this reader besides the first. (i.e., whether calling `rest' will yield a `Reader' with more elements)
Overrides
Reader.atEnd