NumericRange

scala.collection.immutable.NumericRange$
See theNumericRange companion class

A companion object for numeric ranges.

Attributes

Companion:
class
Source:
NumericRange.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Concise view

Type members

Classlikes

class Exclusive[T](start: T, end: T, step: T)(implicit num: Integral[T]) extends NumericRange[T]

Attributes

Source:
NumericRange.scala
Graph
Supertypes
class Inclusive[T](start: T, end: T, step: T)(implicit num: Integral[T]) extends NumericRange[T]

Attributes

Source:
NumericRange.scala
Graph
Supertypes

Value members

Concrete methods

def apply[T](start: T, end: T, step: T)(implicit num: Integral[T]): Exclusive[T]

Attributes

Source:
NumericRange.scala
def count[T](start: T, end: T, step: T, isInclusive: Boolean)(implicit num: Integral[T]): Int

Calculates the number of elements in a range given start, end, step, and whether or not it is inclusive.

Calculates the number of elements in a range given start, end, step, and whether or not it is inclusive. Throws an exception if step == 0 or the number of elements exceeds the maximum Int.

Attributes

Source:
NumericRange.scala
def inclusive[T](start: T, end: T, step: T)(implicit num: Integral[T]): Inclusive[T]

Attributes

Source:
NumericRange.scala