Packages

c

squants

QuantityRange

case class QuantityRange[A <: Quantity[A]](lower: A, upper: A) extends Product with Serializable

Represents a Range starting at one Quantity value and going up to another

A

the Quantity Type

lower

Quantity representing the lower bound of the range

upper

Quantity representing the upper bound of the range

Source
QuantityRange.scala
Since

0.1

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

Instance Constructors

  1. new QuantityRange(lower: A, upper: A)

    lower

    Quantity representing the lower bound of the range

    upper

    Quantity representing the upper bound of the range

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. def *(multiple: Double): QuantitySeries[A]

    times

  4. def ++(that: A): QuantityRange[A]

    int

  5. def ++(): QuantityRange[A]

    inc

  6. def +-(that: A): QuantityRange[A]

    incFromDecTo

  7. def +=(that: A): QuantityRange[A]

    incFrom

  8. def -+(that: A): QuantityRange[A]

    decFromIncTo

  9. def --(that: A): QuantityRange[A]

    dec

  10. def --(): QuantityRange[A]

    dec

  11. def -=(that: A): QuantityRange[A]

    decFrom

  12. def /(divisor: Double): QuantitySeries[A]

    divide

  13. def /(that: A): QuantitySeries[A]

    divide

  14. def /:[B](divisor: Double, z: B)(op: (B, QuantityRange[A]) => B): B

    foldLeft

  15. def /:[B](size: A, z: B)(op: (B, QuantityRange[A]) => B): B

    foldLeft

  16. def :\[B](divisor: Double, z: B)(op: (QuantityRange[A], B) => B): B

    foldRight

  17. def :\[B](size: A, z: B)(op: (QuantityRange[A], B) => B): B

    foldRight

  18. def =+(that: A): QuantityRange[A]

    incTo

  19. def =-(that: A): QuantityRange[A]

    decTo

  20. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  21. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  22. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  23. def contains(that: QuantityRange[A]): Boolean

    Return true if that range is completely contained with this range, otherwise false

    Return true if that range is completely contained with this range, otherwise false

    that

    Quantity

  24. def contains(q: A): Boolean

    Returns true if the quantity is contained within this range, otherwise false.

    Returns true if the quantity is contained within this range, otherwise false. This check is *exclusive* of the range's upper limit.

    q

    Quantity

  25. def dec(that: A): QuantityRange[A]

    Decrements the range's from and to values by an amount equal to the value of that

    Decrements the range's from and to values by an amount equal to the value of that

    that

    Quantity

  26. lazy val dec: QuantityRange[A]

    Decrements the range's from and to value by an amount equal to the Quantity value of the range

  27. def decFrom(that: A): QuantityRange[A]

    Decrements the from value by an amount equal to the value of that

    Decrements the from value by an amount equal to the value of that

    that

    Quantity

  28. def decFromIncTo(that: A): QuantityRange[A]

    Decrements the from value and increments the to by an amount equal to the value of that

    Decrements the from value and increments the to by an amount equal to the value of that

    that

    Quantity

  29. def decTo(that: A): QuantityRange[A]
  30. def divide(that: Double): QuantitySeries[A]

    Divides the range into a Seq of divisor ranges The Seq will begin at from and go till to.

    Divides the range into a Seq of divisor ranges The Seq will begin at from and go till to. If that is an integer value, the range will evenly divided at all points. If that has a fractional component, the first n-1 ranges will be evenly divided by the that and the last range in the list will contain the remainder.

    QuantityRange(Each(1), Each(4)) / 3 => Vector(QuantityRange(1.0 ea,2.0 ea), QuantityRange(2.0 ea,3.0 ea), QuantityRange(3.0 ea,4.0 ea))

    that

    Double

  31. def divide(that: A): QuantitySeries[A]

    Divides the range into a Series of ranges each with a range of size that The Seq will begin at from and go till to.

    Divides the range into a Series of ranges each with a range of size that The Seq will begin at from and go till to. If the range is not evenly divisible by that, the last item in the list will contain the remainder

    QuantityRange(Each(1), Each(4)) / Each(1) => Vector(QuantityRange(1.0 ea,2.0 ea), QuantityRange(2.0 ea,3.0 ea), QuantityRange(3.0 ea,4.0 ea))

    that

    Quantity

  32. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  33. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable])
  34. def foldLeft[B](divisor: Double, z: B)(op: (B, QuantityRange[A]) => B): B

    Divides the range into a Seq of ranges of size each and applies a foldLeft operation

    Divides the range into a Seq of ranges of size each and applies a foldLeft operation

    B

    the result type of the binary operator

    divisor

    The number of ranges to split the range into

    z

    the start value

    op

    the binary operator

  35. def foldLeft[B](size: A, z: B)(op: (B, QuantityRange[A]) => B): B

    Divides the range into a Seq of ranges of size each and applies a foldLeft operation

    Divides the range into a Seq of ranges of size each and applies a foldLeft operation

    B

    the result type of the binary operator

    size

    Quantity representing the size for each QuantityRange in the Seq

    z

    the start value

    op

    the binary operator

  36. def foldRight[B](divisor: Double, z: B)(op: (QuantityRange[A], B) => B): B

    Divides the range into a Seq of ranges of size each and applies a foldRight operation

    Divides the range into a Seq of ranges of size each and applies a foldRight operation

    B

    the result type of the binary operator

    divisor

    The number of ranges to split the range into

    z

    the start value

    op

    the binary operator

  37. def foldRight[B](size: A, z: B)(op: (QuantityRange[A], B) => B): B

    Divides the range into a Seq of ranges of size each and applies a foldRight operation

    Divides the range into a Seq of ranges of size each and applies a foldRight operation

    B

    the result type of the binary operator

    size

    Quantity representing the size for each QuantityRange in the Seq

    z

    the start value

    op

    the binary operator

  38. def foreach[U](divisor: Double)(op: (QuantityRange[A]) => U): Unit

    Divides the range into a Seq of divisor ranges and applies a f to each element

    Divides the range into a Seq of divisor ranges and applies a f to each element

    divisor

    Quantity representing the size for each QuantityRange in the Seq

    op

    the side affecting operation

  39. def foreach[U](size: A)(op: (QuantityRange[A]) => U): Unit

    Divides the range into a Seq of ranges of size each and applies a f to each element

    Divides the range into a Seq of ranges of size each and applies a f to each element

    size

    Quantity representing the size for each QuantityRange in the Seq

    op

    the side affecting operation

  40. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  41. def inc(that: A): QuantityRange[A]

    Increments the range's from and to values by an amount equal to the value of that

    Increments the range's from and to values by an amount equal to the value of that

    that

    Quantity

  42. lazy val inc: QuantityRange[A]

    Increments the range's from and to values by an amount equal to the Quantity value of the range

  43. def incFrom(that: A): QuantityRange[A]

    Increments the from value by an amount equal to the value of that

    Increments the from value by an amount equal to the value of that

    that

    Quantity

  44. def incFromDecTo(that: A): QuantityRange[A]

    Increments the from value and decrements the to by an amount equal to the value of that

    Increments the from value and decrements the to by an amount equal to the value of that

    that

    Quantity

  45. def incTo(that: A): QuantityRange[A]

    Increments the to value by an amount equal to the value of that

    Increments the to value by an amount equal to the value of that

    that

    Quantity

  46. def includes(that: QuantityRange[A]): Boolean

    Returns true if that range is completely included in this range, otherwise false

    Returns true if that range is completely included in this range, otherwise false

    that

    QuantityRange[A]

  47. def includes(q: A): Boolean

    Returns true if that quantity is included within this range.

    Returns true if that quantity is included within this range. This check is *inclusive* of the range's upper limit.

    q

    Quantity

  48. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  49. val lower: A
  50. def map[B](divisor: Double)(op: (QuantityRange[A]) => B): Seq[B]

    Divides the range into a Seq of divisor ranges and applies a map operation to each

    Divides the range into a Seq of divisor ranges and applies a map operation to each

    B

    the result type of the map operation

    divisor

    Quantity representing the size for each QuantityRange in the Seq

    op

    the transformation operation

  51. def map[B](size: A)(op: (QuantityRange[A]) => B): Seq[B]

    Divides the range into a Seq of ranges of size each and applies a map operation to each

    Divides the range into a Seq of ranges of size each and applies a map operation to each

    B

    the result type of the map operation

    size

    Quantity representing the size for each QuantityRange in the Seq

    op

    the transformation operation

  52. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  53. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  54. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  55. def partiallyContains(range: QuantityRange[A]): Boolean

    Returns true if that range contains any part that is in this range, otherwise false

    Returns true if that range contains any part that is in this range, otherwise false

    range

    QuantityRange[A]

  56. def partiallyIncludes(range: QuantityRange[A]): Boolean

    Returns true if that range includes any part that is in this range, otherwise false

    Returns true if that range includes any part that is in this range, otherwise false

    range

    QuantityRange[A]

  57. def productElementNames: Iterator[String]
    Definition Classes
    Product
  58. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  59. def times(multiple: Double): QuantitySeries[A]

    Create a Seq of multiple ranges equal in size to the original with sequential range values If multiple contains a fractional component, the last item in the resulting range will be equal to that fraction of the original

    Create a Seq of multiple ranges equal in size to the original with sequential range values If multiple contains a fractional component, the last item in the resulting range will be equal to that fraction of the original

    multiple

    Number of ranges to create

  60. lazy val toList: List[A]

    Return this Range's boundary values as List[A] or the two

  61. lazy val toQuantity: A

    Returns a quantity that is equal to the difference between the from and to

  62. lazy val toSeq: Seq[A]

    Returns this Range's boundary values as a Seq[A] of the two

  63. val upper: A
  64. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  65. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  66. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from AnyRef

Inherited from Any

Ungrouped