QuantityRange
Represents a Range starting at one Quantity value and going up to another
Represents a Range starting at one Quantity value and going up to another
- Type Params
- A
the Quantity Type
- Value Params
- lower
Quantity representing the lower bound of the range
- upper
Quantity representing the upper bound of the range
- Authors
garyKeorkunian
- Since
0.1
Value members
Concrete methods
Returns true if the quantity is contained within this range, otherwise false. This check is exclusive of the range's upper limit.
Returns true if the quantity is contained within this range, otherwise false. This check is exclusive of the range's upper limit.
- Value Params
- q
Quantity
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
- Value Params
- that
Quantity
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
- Value Params
- that
Quantity
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
- Value Params
- that
Quantity
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
- Value Params
- that
Quantity
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
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))
- Value Params
- that
Quantity
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.
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))
- Value Params
- that
Double
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
- Type Params
- B
the result type of the binary operator
- Value Params
- op
the binary operator
- size
Quantity representing the size for each QuantityRange in the Seq
- z
the start value
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
- Type Params
- B
the result type of the binary operator
- Value Params
- divisor
The number of ranges to split the range into
- op
the binary operator
- z
the start value
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
- Type Params
- B
the result type of the binary operator
- Value Params
- op
the binary operator
- size
Quantity representing the size for each QuantityRange in the Seq
- z
the start value
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
- Type Params
- B
the result type of the binary operator
- Value Params
- divisor
The number of ranges to split the range into
- op
the binary operator
- z
the start value
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
- Value Params
- op
the side affecting operation
- size
Quantity representing the size for each QuantityRange in the Seq
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
- Value Params
- divisor
Quantity representing the size for each QuantityRange in the Seq
- op
the side affecting operation
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
- Value Params
- that
Quantity
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
- Value Params
- that
Quantity
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
- Value Params
- that
Quantity
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
- Value Params
- that
Quantity
Returns true if that
quantity is included within this
range.
This check is inclusive of the range's upper limit.
Returns true if that
quantity is included within this
range.
This check is inclusive of the range's upper limit.
- Value Params
- q
Quantity
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
- Value Params
- that
QuantityRange[A]
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
- Type Params
- B
the result type of the map operation
- Value Params
- op
the transformation operation
- size
Quantity representing the size for each QuantityRange in the Seq
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
- Type Params
- B
the result type of the map operation
- Value Params
- divisor
Quantity representing the size for each QuantityRange in the Seq
- op
the transformation operation
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
- Value Params
- range
QuantityRange[A]
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
- Value Params
- range
QuantityRange[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
- Value Params
- multiple
Number of ranges to create
Inherited methods
Concrete fields
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
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
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 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