Class/Object

cats.collections

Range

Related Docs: object Range | package collections

Permalink

final case class Range[A](start: A, end: A) extends Product with Serializable

Represent an inclusive range [x, y] that can be generated by using discrete operations

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Range
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. AnyRef
  7. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Range(start: A, end: A)

    Permalink

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. def &(other: Range[A])(implicit order: Order[A]): Option[Range[A]]

    Permalink
  4. def +(other: Range[A])(implicit order: Order[A], enum: Discrete[A]): (Range[A], Option[Range[A]])

    Permalink
  5. def -(range: Range[A])(implicit enum: Discrete[A], order: Order[A]): Option[(Range[A], Option[Range[A]])]

    Permalink

    Subtract a Range from this range.

    Subtract a Range from this range. The result will be 0, 1 or 2 ranges

  6. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  7. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  8. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  9. def contains(x: A)(implicit A: Order[A]): Boolean

    Permalink

    Verify is x is in range [start, end]

  10. def contains(range: Range[A])(implicit order: Order[A]): Boolean

    Permalink

    Verify that the passed range is a sub-range

  11. val end: A

    Permalink
  12. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  13. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  14. def foldLeft[B](s: B, f: (B, A) ⇒ B)(implicit discrete: Discrete[A], order: Order[A]): B

    Permalink

    Folds over the elements of the range from left to right; accumulates a value of type B by applying the function f to the current value and the next element.

  15. def foldRight[B](s: B, f: (A, B) ⇒ B)(implicit discrete: Discrete[A], order: Order[A]): B

    Permalink

    Folds over the elements of the range from right to left; accumulates a value of type B by applying the function f to the current value and the next element.

  16. def foreach(f: (A) ⇒ Unit)(implicit enum: Discrete[A], order: Order[A]): Unit

    Permalink

    Apply function f to each element in range [star, end]

  17. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  18. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  19. def map[B](f: (A) ⇒ B): Range[B]

    Permalink
  20. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  21. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  22. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  23. def reverse: Range[A]

    Permalink

    Returns range [end, start]

  24. val start: A

    Permalink
  25. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  26. def toIterator(implicit discrete: Discrete[A], order: Order[A]): Iterator[A]

    Permalink

    Return an iterator for the values in the range.

    Return an iterator for the values in the range. The iterator moves from start to end taking into consideration the provided ordering. If (start > end) it uses start's predecessor offered by the Discrete instance, otherwise it uses the start's successor.

  27. def toList(implicit enum: Discrete[A], order: Order[A]): List[A]

    Permalink

    Return all the values in the Range as a List.

  28. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  29. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  30. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from AnyRef

Inherited from Any

Ungrouped