Packages

object NumericRange extends java.io.Serializable

A companion object for numeric ranges.

Source
NumericRange.scala
Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. NumericRange
  2. Serializable
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Type Members

  1. class Exclusive[T] extends NumericRange[T]
    Annotations
    @SerialVersionUID()
  2. class Inclusive[T] extends NumericRange[T]
    Annotations
    @SerialVersionUID()

Value Members

  1. def apply[T](start: T, end: T, step: T)(implicit num: Integral[T]): Exclusive[T]
  2. 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.

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