_methods

trait _methods

Int Extension Methods

Extension methods universaly avaialble for type scala.Int

Source
_methods.scala
trait Int.Z.ToPrimitives[Int]
class java.lang.Object
trait scala.Matchable
class Any

Def

@scala.annotation.targetName("range")
inline def <>(inline to: Int): Int.<>

Range

Range

Returns Int.<> from current to given value

 (1 <> 10).tp  // Prints  1 <> 10
Source
_methods.scala
@scala.annotation.targetName("rangeOfSize")
inline def <>=(inline size: Int): Int.<>

Range by size

Range by size

Returns Int.<> starting at current value and with given size

 (5 <>= 10).tp  // Prints 5 <> 14
Source
_methods.scala
@scala.annotation.targetName("rangeX")
inline def <>>(inline to: Int): Int.<>

Exclusive end range

Exclusive end range

Returns Int.<> from current to given value exclusive

 (1 <>> 10).tp  // Prints  1 <> 9
Source
_methods.scala
@scala.annotation.targetName("Opt")
inline def ?: Int.Opt

To option

To option

Returns Int.Opt for current value

 val o : Int.Opt = 12.?
Source
_methods.scala
inline def atLeast(v: Int): Int

Max

Max

Returns maximum of current or given value

 val b = 5

 b.atLeast(0).tp   // Prints 5

 b.atLeast(10).tp  // Prints 10
Source
_methods.scala
inline def atMost(v: Int): Int

Min

Min

Returns minimun of current or given value

 val b = 5

 b.atMost(0).tp   // Prints 0

 b.atMost(10).tp  // Prints 5
Source
_methods.scala
inline def roundTo(inline size: Int)(using r: Rounding): Int

Round to size

Round to size

Rounds current value to specified size

 91.roundTo(5).tp            // Prints 90

 91.roundTo(5)(using UP).tp  // Prints 95
Source
_methods.scala

Make

inline def Big: BigInteger

Make BigInteger

Make BigInteger

BigInteger constructor attached to Int

Source
_methods.scala
inline def Byte: Byte

Make Byte

Make Byte

Attached Byte constructor

Inherited from
toPrimitives
Source
toPrimitives.scala
inline def ByteCount: ByteCount

Make ByteCount

Make ByteCount

ByteCount constructor attached to Int

Source
_methods.scala
inline def Char: Char

Make Char

Make Char

Attached Char constructor

Inherited from
toPrimitives
Source
toPrimitives.scala
inline def Day: Time.Length

Make Time.Length

Make Time.Length

Time.Length constructor attached to Int

Source
_methods.scala
inline def Days: Time.Length

Make Time.Length

Make Time.Length

Time.Length constructor attached to Int

Source
_methods.scala
inline def Double: Double

Make Double

Make Double

Attached Double constructor

Inherited from
toPrimitives
Source
toPrimitives.scala
inline def Float: Float

Make Float

Make Float

Attached Float constructor

Inherited from
toPrimitives
Source
toPrimitives.scala
inline def Hour: Time.Length

Make Time.Length

Make Time.Length

Time.Length constructor attached to Int

Source
_methods.scala
inline def Hours: Time.Length

Make Time.Length

Make Time.Length

Time.Length constructor attached to Int

Source
_methods.scala
inline def Int: Int

Make Int

Make Int

Returnes underlying value

Inherited from
toPrimitives
Source
toPrimitives.scala
inline def Long: Long

Make Long

Make Long

Attached Long constructor

Inherited from
toPrimitives
Source
toPrimitives.scala
inline def Micros: Time.Length

Make Time.Length

Make Time.Length

Time.Length constructor attached to Int

Source
_methods.scala
inline def Millis: Time.Length

Make Time.Length

Make Time.Length

Time.Length constructor attached to Int

Source
_methods.scala
inline def Minute: Time.Length

Make Time.Length

Make Time.Length

Time.Length constructor attached to Int

Source
_methods.scala
inline def Minutes: Time.Length

Make Time.Length

Make Time.Length

Time.Length constructor attached to Int

Source
_methods.scala
inline def Nanos: Time.Length

Make Time.Length

Make Time.Length

Time.Length constructor attached to Int

Source
_methods.scala
inline def Number: java.lang.Integer

Make Number

Make Number

Attached Number constructor

Inherited from
toPrimitives
Source
toPrimitives.scala
inline def Percent: Percent

Make Percent

Make Percent

Percent constructor attached to Int

Source
_methods.scala
inline def Second: Time.Length

Make Time.Length

Make Time.Length

Time.Length constructor attached to Int

Source
_methods.scala
inline def Seconds: Time.Length

Make Time.Length

Make Time.Length

Time.Length constructor attached to Int

Source
_methods.scala
inline def Short: Short

Make Short

Make Short

Attached Short constructor

Inherited from
toPrimitives
Source
toPrimitives.scala
inline def Week: Time.Length

Make Time.Length

Make Time.Length

Time.Length constructor attached to Int

Source
_methods.scala
inline def Weeks: Time.Length

Make Time.Length

Make Time.Length

Time.Length constructor attached to Int

Source
_methods.scala
inline def Year: Year

Make Year

Make Year

Year constructor attached to Int

Source
_methods.scala