<>.X.Base

abstract class Base[A, THIS <: <>[A]] extends <>[A]
Source
X.scala
class <>[A]
trait Able.Contain[A]
class java.lang.Object
trait scala.Matchable
class Any
class Period

Def

def contains(v: A): Boolean

Check if within

Check if within

Returns true if this range contains specified value

 (1 <> 9) contains 3  // Returns: true
Inherited from
Range
Source
__.scala
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
Inherited from
Range
Source
__.scala
def end: A

Make value

Make value

End value of the range

Inherited from
Range
Source
__.scala
def endIsIn: Boolean

Inclusive check

Inclusive check

If true, the end value is inclusive

 (10 <>> 15) contains 15   // Returns: false

 // Exclusive 15 does not contain 15
Inherited from
Range
Source
__.scala
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
@scala.annotation.targetName("join")
def join(v: A): this.type
Source
X.scala
@scala.annotation.targetName("join")
def join(r: <>[A]): this.type
Source
X.scala
protected def make(s: A, e: A, in: Boolean)(using scala.Ordering[A]): this.type
Source
X.scala
def ordering: scala.Ordering[A]

Ordering

Ordering

Ordering defining range

Ordering defining type elements comparison

Inherited from
Range
Source
__.scala
@scala.annotation.targetName("overlap_Opt")
def overlap_?(r: <>[A]): Opt[this.type]
Source
X.scala
def overlaps(r: <>[A]): Boolean
Source
X.scala
inline def raw[RAW <: <>.RawType[A]](using inline s: Given.RangeTag.Raw[A, RAW]): RAW

Raw range

Raw range

Returns primitive specialized range implementation.

The method would not compile for a non specializable range.

Inherited from
Range
Source
__.scala
def start: A

From value

From value

Start value of the range

Inherited from
Range
Source
__.scala
def step_~(step: Int)(using Able.Sequence[A]): ~[A]

Stepped stream

Stepped stream

For sequential types, the method returns a stream of values with given step.

 (1 <> 10).step_~(2).tp  // Prints: ~(1, 3, 5, 7, 9)
Inherited from
Range
Source
__.scala
def step_~(f: A => A): ~[A]

Mapped stream

Mapped stream

Returns a stream containing the first range value and the result of applying given function to this value and the produced results. The stream ends when the function result is no longer within range.

 (1 <> 10).step_~( _ + 3).tp  // Prints: ~(1, 4, 7, 10)
Inherited from
Range
Source
__.scala