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
- Alphabetic
- By Inheritance
- QuantityRange
- Serializable
- Product
- Equals
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- 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
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##(): Int
- Definition Classes
- AnyRef → Any
- def *(multiple: Double): QuantitySeries[A]
times
- def ++(that: A): QuantityRange[A]
int
- def ++(): QuantityRange[A]
inc
- def +-(that: A): QuantityRange[A]
incFromDecTo
- def +=(that: A): QuantityRange[A]
incFrom
- def -+(that: A): QuantityRange[A]
decFromIncTo
- def --(that: A): QuantityRange[A]
dec
- def --(): QuantityRange[A]
dec
- def -=(that: A): QuantityRange[A]
decFrom
- def /(divisor: Double): QuantitySeries[A]
divide
- def /(that: A): QuantitySeries[A]
divide
- def /:[B](divisor: Double, z: B)(op: (B, QuantityRange[A]) => B): B
foldLeft
- def /:[B](size: A, z: B)(op: (B, QuantityRange[A]) => B): B
foldLeft
- def :\[B](divisor: Double, z: B)(op: (QuantityRange[A], B) => B): B
foldRight
- def :\[B](size: A, z: B)(op: (QuantityRange[A], B) => B): B
foldRight
- def =+(that: A): QuantityRange[A]
incTo
- def =-(that: A): QuantityRange[A]
decTo
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- def contains(that: QuantityRange[A]): Boolean
Return true if
that
range is completely contained withthis
range, otherwise falseReturn true if
that
range is completely contained withthis
range, otherwise false- that
Quantity
- 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
- 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
- lazy val dec: QuantityRange[A]
Decrements the range's from and to value by an amount equal to the Quantity value of the range
- def decFrom(that: A): QuantityRange[A]
Decrements the
from
value by an amount equal to the value ofthat
Decrements the
from
value by an amount equal to the value ofthat
- that
Quantity
- def decFromIncTo(that: A): QuantityRange[A]
Decrements the
from
value and increments theto
by an amount equal to the value ofthat
Decrements the
from
value and increments theto
by an amount equal to the value ofthat
- that
Quantity
- def decTo(that: A): QuantityRange[A]
- def divide(that: Double): QuantitySeries[A]
Divides the range into a Seq of
divisor
ranges The Seq will begin atfrom
and go tillto
.Divides the range into a Seq of
divisor
ranges The Seq will begin atfrom
and go tillto
. Ifthat
is an integer value, the range will evenly divided at all points. Ifthat
has a fractional component, the first n-1 ranges will be evenly divided by thethat
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
- 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 atfrom
and go tillto
.Divides the range into a Series of ranges each with a range of size
that
The Seq will begin atfrom
and go tillto
. If the range is not evenly divisible bythat
, the last item in the list will contain the remainderQuantityRange(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
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- 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 operationDivides 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
- 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 operationDivides 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
- 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 operationDivides 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
- 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 operationDivides 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
- 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 elementDivides 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
- 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 elementDivides 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
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- 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
- lazy val inc: QuantityRange[A]
Increments the range's from and to values by an amount equal to the Quantity value of the range
- def incFrom(that: A): QuantityRange[A]
Increments the
from
value by an amount equal to the value ofthat
Increments the
from
value by an amount equal to the value ofthat
- that
Quantity
- def incFromDecTo(that: A): QuantityRange[A]
Increments the
from
value and decrements theto
by an amount equal to the value ofthat
Increments the
from
value and decrements theto
by an amount equal to the value ofthat
- that
Quantity
- def incTo(that: A): QuantityRange[A]
Increments the
to
value by an amount equal to the value ofthat
Increments the
to
value by an amount equal to the value ofthat
- that
Quantity
- def includes(that: QuantityRange[A]): Boolean
Returns true if
that
range is completely included inthis
range, otherwise falseReturns true if
that
range is completely included inthis
range, otherwise false- that
QuantityRange[A]
- def includes(q: A): Boolean
Returns true if
that
quantity is included withinthis
range.Returns true if
that
quantity is included withinthis
range. This check is *inclusive* of the range's upper limit.- q
Quantity
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- val lower: A
- 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 eachDivides 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
- 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 eachDivides 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
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- def partiallyContains(range: QuantityRange[A]): Boolean
Returns true if
that
range contains any part that is inthis
range, otherwise falseReturns true if
that
range contains any part that is inthis
range, otherwise false- range
QuantityRange[A]
- def partiallyIncludes(range: QuantityRange[A]): Boolean
Returns true if
that
range includes any part that is inthis
range, otherwise falseReturns true if
that
range includes any part that is inthis
range, otherwise false- range
QuantityRange[A]
- def productElementNames: Iterator[String]
- Definition Classes
- Product
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def times(multiple: Double): QuantitySeries[A]
Create a Seq of
multiple
ranges equal in size to the original with sequential range values Ifmultiple
contains a fractional component, the last item in the resulting range will be equal to that fraction of the originalCreate a Seq of
multiple
ranges equal in size to the original with sequential range values Ifmultiple
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
- lazy val toList: List[A]
Return this Range's boundary values as List[A] or the two
- lazy val toQuantity: A
Returns a quantity that is equal to the difference between the
from
andto
- lazy val toSeq: Seq[A]
Returns this Range's boundary values as a Seq[A] of the two
- val upper: A
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()