Range

object Range

Companion object for ranges.

Companion:
class
Source:
Range.scala
class Object
trait Matchable
class Any
Range.type

Type members

Classlikes

object BigDecimal
object BigInt
final class Exclusive(start: Int, end: Int, step: Int) extends Range
final class Inclusive(start: Int, end: Int, step: Int) extends Range
object Int
object Long
final class Partial[T, U](f: T => U) extends AnyVal

Value members

Concrete methods

def apply(start: Int, end: Int, step: Int): Exclusive

Make a range from start until end (exclusive) with given step value.

Make a range from start until end (exclusive) with given step value.

Note:

step != 0

Source:
Range.scala
def apply(start: Int, end: Int): Exclusive

Make a range from start until end (exclusive) with step value 1.

Make a range from start until end (exclusive) with step value 1.

Source:
Range.scala
def count(start: Int, end: Int, step: Int, isInclusive: Boolean): Int

Counts the number of range elements.

Counts the number of range elements. precondition: step != 0 If the size of the range exceeds Int.MaxValue, the result will be negative.

Source:
Range.scala
def count(start: Int, end: Int, step: Int): Int
def inclusive(start: Int, end: Int, step: Int): Inclusive

Make an inclusive range from start to end with given step value.

Make an inclusive range from start to end with given step value.

Note:

step != 0

Source:
Range.scala
def inclusive(start: Int, end: Int): Inclusive

Make an inclusive range from start to end with step value 1.

Make an inclusive range from start to end with step value 1.

Source:
Range.scala