class Range[A <: Any.Short](_start: A, _size: Int) extends Val.Range[A] with Able.Size with Able.Stream[A]
Short Specialized Generic Range
To be used with Short based opaque values.
- Source
- Range.scala
trait Any.Z.PrimitiveTag.Short
trait Any.Z.PrimitiveTag
trait Able.Stream[Short.G.Range.A]
trait Able.Size
class Range[Short.G.Range.A]
trait Able.Empty
trait Able.Contain[Short.G.Range.A]
class java.lang.Object
trait scala.Matchable
class Any
Def
Constructor
Body
Check if within
Check if within
Returns true if this
range contains specified range
(1 <> 9) contains (3 <> 7) // Returns: true
(1 <> 5) contains (3 <> 7) // Returns: false
- Definition Classes
- Source
- Range.scala
Check if within
Check if within
Returns true if this
range contains specified range
(1 <> 9) contains (3 <> 7) // Returns: true
(1 <> 5) contains (3 <> 7) // Returns: false
- Definition Classes
- Source
- Range.scala
Empty check
Empty check
Checks if the range is able contain anything.
For empty range the start and end values are the same and the end value is not inclusive
- Definition Classes
- Source
- Range.scala
Stream of calculated values
Stream of calculated values
Returns a stream starting with the first range value. Every next value is calculated by applying the given function to the prior value. The stream ends when the function result is no longer within range.
(1 <> 10).stepStream( _ + 3).tp // Prints: Stream(1, 4, 7, 10)