Packages

object Range extends Serializable

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

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def atLeast[A](n: Int, l: List[A]): Boolean

    Check that list contains at least a certain number of elements.

  6. def clamp[A](x: A, y: A, n: A)(implicit O: Ordering[A]): A

    Truncate a value so it stays within some range.

    Truncate a value so it stays within some range.

    scala> clamp(5, 10, 15)
    10
    
    scala> clamp(5, 10, 0)
    5
  7. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
  8. def constant[A](x: A, y: A): Range[A]

    Construct a range which is unaffected by the size parameter.

    Construct a range which is unaffected by the size parameter.

    A range from 0 to 10, with the origin at 0:

    scala> Range.constant(0, 10).bounds(x)
    (0,10)
    
    scala> Range.constant(0, 10).origin
    0
  9. def constantFrom[A](z: A, x: A, y: A): Range[A]

    Construct a range which is unaffected by the size parameter with a origin point which may differ from the bounds.

    Construct a range which is unaffected by the size parameter with a origin point which may differ from the bounds.

    A range from -10 to 10, with the origin at 0:

    scala> Range.constantFrom(0, -10, 10).bounds(x)
    (-10,10)
    
    scala> Range.constantFrom(0, -10, 10).origin
    0

    A range from 1970 to 2100, with the origin at 2000:

    scala> Range.constantFrom(2000, 1970, 2100).bounds(x)
    (1970,2100)
    
    scala> Range.constantFrom(2000, 1970, 2100).origin
    2000
  10. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  11. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  12. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  13. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  14. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  15. def linear[A](x: A, y: A)(implicit arg0: Integral[A], arg1: IntegralPlus[A], arg2: NumericPlus[A]): Range[A]

    Construct a range which scales the second bound relative to the size parameter.

    Construct a range which scales the second bound relative to the size parameter.

    scala> Range.linear(0, 10).bounds(Size(1))
    (0,0)
    
    scala> Range.linear(0, 10).bounds(Size(50))
    (0,5)
    
    scala> Range.linear(0, 10).bounds(Size(100))
    (0,10)
  16. def linearFrac[A](x: A, y: A)(implicit arg0: Fractional[A], arg1: DecimalPlus[A], arg2: NumericPlus[A]): Range[A]

    Construct a range which scales the second bound relative to the size parameter.

    Construct a range which scales the second bound relative to the size parameter.

    This works the same as 'linear', but for fractional values.

  17. def linearFracFrom[A](z: A, x: A, y: A)(implicit I: Fractional[A], J: DecimalPlus[A], R: NumericPlus[A]): Range[A]

    Construct a range which scales the bounds relative to the size parameter.

    Construct a range which scales the bounds relative to the size parameter.

    This works the same as linearFrom, but for fractional values.

  18. def linearFracFrom_[A](z: A, x: A, y: A)(implicit arg0: Fractional[A], arg1: NumericPlus[A]): Range[A]
  19. def linearFrom[A](z: A, x: A, y: A)(implicit I: Integral[A], J: IntegralPlus[A], R: NumericPlus[A]): Range[A]

    Construct a range which scales the second bound relative to the size parameter.

    Construct a range which scales the second bound relative to the size parameter.

    scala> Range.linearFrom(0, -10, 10).bounds(Size(1))
    (0,0)
    
    scala> Range.linearFrom(0, -10, 20).bounds(Size(50))
    (-5,10)
    
    scala> Range.linearFrom(0, -10, 20).bounds(Size(100))
    (-10,20)
  20. def linearFrom_[A](z: A, x: A, y: A)(implicit arg0: Integral[A], arg1: NumericPlus[A]): Range[A]
  21. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  22. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  23. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  24. def scaleLinear[A](sz: Size, z: A, n: A)(implicit I: Integral[A], J: NumericPlus[A]): A

    Scale an integral linearly with the size parameter.

  25. def scaleLinearFrac[A](sz: Size, z: A, n: A)(implicit F: Fractional[A], J: NumericPlus[A]): A

    Scale a fractional number linearly with the size parameter.

  26. def singleton[A](x: A): Range[A]

    Construct a range which represents a constant single value.

    Construct a range which represents a constant single value.

    scala> Range.singleton(5).bounds(x)
    (5,5)
    
    scala> Range.singleton(5).origin
    5
  27. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  28. def toString(): String
    Definition Classes
    AnyRef → Any
  29. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  30. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  31. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated

Inherited from Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped