Char.G.Range

class Range[A <: Any.Char](_start: A, _size: Int) extends Val.Range[A] with Able.Size with Able.Stream[A]

Char Specialized Generic Range

To be used with Char based opaque values.

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

Def

Constructor

def this(start: A, end: A, endIn: Boolean)

Body

inline def ~~: Char.G.Stream[A]

Alias to "stream"

Alias to "stream"

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

Definition Classes
Source
Range.scala
def join(v: A): this.type
def join(r: Range[A]): this.type
def overlaps(r: Char.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
def size: Int
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