Double.G.Range

class Range[A <: Any.Double](_start: A, _end: A, endIn: Boolean) extends Val.Range[A]

Double Specialized Generic Range

To be used with Double based opaque values.

Source
Range.scala
trait Any.Z.PrimitiveTag.Double
trait Any.Z.PrimitiveTag
class Range[Double.G.Range.A]
trait Able.Contain[Double.G.Range.A]
class java.lang.Object
trait scala.Matchable
class Any

Def

override def contains(v: A): Boolean

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
def contains(r: Double.G.Range[A]): Boolean
override def contains(r: Range[A]): Boolean

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
final def end: A
final def endIsIn: Boolean
override def equals(v: Any): Boolean
Definition Classes
Range -> Any
Inherited from
Range
Source
__.scala
def isEmpty: Boolean

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

Inherited from
Range
Source
__.scala
def join(v: A): this.type
def join(r: Range[A]): this.type
final def ordering: Ordering[A]
def overlaps(r: Double.G.Range[A]): Boolean
def overlaps(r: Range[A]): Boolean
inline def raw(using sp: Specialized.Primitive[A]): s.Range

Primitive range

Primitive range

Returns primitive specialized range implementation.

The method will not compile for reference types.

Inherited from
Range
Source
__.scala
final def start: A
def stepStream(f: A => A): Stream[A]

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)
Inherited from
Range
Source
__.scala