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, Serializable, Product, Equals, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. QuantityRange
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. AnyRef
  7. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

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: AnyRef): Boolean

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

    Definition Classes
    AnyRef → Any
  4. def *(multiple: Double): QuantitySeries[A]

    times

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

    int

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

    inc

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

    incFromDecTo

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

    incFrom

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

    decFromIncTo

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

    dec

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

    dec

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

    decFrom

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

    divide

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

    divide

  15. def /:[B](divisor: Double, z: B)(op: (B, QuantityRange[A]) ⇒ B): B

    foldLeft

  16. def /:[B](size: A, z: B)(op: (B, QuantityRange[A]) ⇒ B): B

    foldLeft

  17. def :\[B](divisor: Double, z: B)(op: (QuantityRange[A], B) ⇒ B): B

    foldRight

  18. def :\[B](size: A, z: B)(op: (QuantityRange[A], B) ⇒ B): B

    foldRight

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

    incTo

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

    decTo

  21. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  22. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  23. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  24. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  25. 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

    returns

  26. 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

    q

    Quantity

    returns

  27. 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

    returns

  28. lazy val dec: QuantityRange[A]

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

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

    returns

  29. 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

    returns

  30. 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

    returns

  31. def decTo(that: A): QuantityRange[A]

  32. 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

    returns

  33. 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

    returns

  34. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  35. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  36. 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

    returns

  37. 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

    returns

  38. 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

    returns

  39. 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

    returns

  40. 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

    returns

  41. 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

    returns

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

    Definition Classes
    AnyRef → Any
  43. 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

    returns

  44. lazy val inc: QuantityRange[A]

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

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

    returns

  45. 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

    returns

  46. 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

    returns

  47. 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

    returns

  48. 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]

    returns

  49. 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

    q

    Quantity

    returns

  50. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  51. val lower: A

    Quantity representing the lower bound of the range

  52. 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

    returns

  53. 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

    returns

  54. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  55. final def notify(): Unit

    Definition Classes
    AnyRef
  56. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  57. 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]

    returns

  58. 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]

    returns

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

    Definition Classes
    AnyRef
  60. 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

    returns

  61. lazy val toList: List[A]

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

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

    returns

  62. lazy val toQuantity: A

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

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

    returns

  63. lazy val toSeq: Seq[A]

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

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

    returns

  64. val upper: A

    Quantity representing the upper bound of the range

  65. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from AnyRef

Inherited from Any

Ungrouped