Object/Class

hedgehog

Range

Related Docs: class Range | package hedgehog

Permalink

object Range extends Serializable

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

Value Members

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

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

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

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

    Permalink
    Definition Classes
    Any
  5. def atLeast[A](n: Int, l: List[A]): Boolean

    Permalink

    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

    Permalink

    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

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  8. def constant[A](x: A, y: A): Range[A]

    Permalink

    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]

    Permalink

    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

    Permalink
    Definition Classes
    AnyRef
  11. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  12. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  13. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  14. def hashCode(): Int

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

    Permalink
    Definition Classes
    Any
  16. def linear[A](x: A, y: A)(implicit arg0: Integral[A], arg1: IntegralPlus[A], arg2: NumericPlus[A]): Range[A]

    Permalink

    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)
  17. def linearFrac[A](x: A, y: A)(implicit arg0: Fractional[A], arg1: DecimalPlus[A], arg2: NumericPlus[A]): Range[A]

    Permalink

    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.

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

    Permalink

    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.

  19. def linearFracFrom_[A](z: A, x: A, y: A)(implicit arg0: Fractional[A], arg1: NumericPlus[A]): Range[A]

    Permalink
  20. def linearFrom[A](z: A, x: A, y: A)(implicit I: Integral[A], J: IntegralPlus[A], R: NumericPlus[A]): Range[A]

    Permalink

    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)
  21. def linearFrom_[A](z: A, x: A, y: A)(implicit arg0: Integral[A], arg1: NumericPlus[A]): Range[A]

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

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

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

    Permalink
    Definition Classes
    AnyRef
  25. def scaleLinear[A](sz: Size, z: A, n: A)(implicit I: Integral[A], J: NumericPlus[A]): A

    Permalink

    Scale an integral linearly with the size parameter.

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

    Permalink

    Scale a fractional number linearly with the size parameter.

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

    Permalink

    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
  28. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  29. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  30. final def wait(): Unit

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

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

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

Inherited from Serializable

Inherited from Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped