Span

com.phasmidsoftware.tableparser.core.table.Span
See theSpan companion object
case class Span(from: Position, until: Position)

A range of positions: from (the first position wanted) up to, but not including, until (the first position not wanted), as for Scala's Ranges (e.g. 5 until 8). So Span(At(5), At(8)) is the positions 5, 6 and 7 (as "5-7" in RFC 7111); a Span whose until is not after its from is empty. As until, Last means after the last position (so Span(At(5), Last) is from 5 to the end, as "5-*").

Value parameters

from

the first position wanted.

until

the first position not wanted.

Attributes

Companion
object
Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

def contains(i: Int, maybeLast: Option[Int]): Boolean

Method to determine whether this Span contains the number i.

Method to determine whether this Span contains the number i.

Value parameters

i

a row (or column) number.

maybeLast

the number of the last row (or column), which is needed only if "*" starts this Span.

Attributes

Returns

true if i is in this Span.

def maybeEnd: Option[Int]

Attributes

Returns

the first number this Span could not contain, if it doesn't extend to the end.

def needsLast: Boolean

Attributes

Returns

true if this Span cannot be evaluated without knowing the last position.

Inherited methods

def productElementNames: Iterator[String]

An iterator over the names of all the elements of this product.

An iterator over the names of all the elements of this product.

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

An iterator over all the elements of this product.

An iterator over all the elements of this product.

Attributes

Returns

in the default implementation, an Iterator[Any]

Inherited from:
Product