_methods

trait _methods

Long Extension Methods

Extension methods universaly avaialble for type scala.Long

Source
_methods.scala
class java.lang.Object
trait scala.Matchable
class Any

Def

@targetName("range")
inline def <>(to: Long): Long.Range

Range

Range

Returns Long.Range from current to given value

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

Range by size

Range by size

Returns Long.Range starting at current value and with given size

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

Exclusive end range

Exclusive end range

Returns Long.Range from current to given value exclusive

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

To option

To option

Returns Long.Opt for current value

 val o : Long.Opt = 12L.?
Source
_methods.scala
inline def max(v: Long): Long

Max value

Max value

Returns maximum of current or given value

 val v = 5L

 v.max(0).tp   // Prints 5

 v.max(10).tp  // Prints 10
Source
_methods.scala
inline def min(v: Long): Long

Min value

Min value

Returns minimun of current or given value

 val v = 5L

 v.min(0).tp   // Prints 0

 v.min(10).tp  // Prints 5
Source
_methods.scala
inline def roundTo(unit: Long)(using r: Math.Rounding): Long

Round to size

Round to size

Rounds current value to specified size

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

 91L.roundTo(5)(using UP).tp  // Prints 95
Source
_methods.scala
inline def tagBrief: String
inline def toByte: Byte

Make Byte

Make Byte

Returns underlying value

Source
_methods.scala
inline def toChar: Char

Make Char

Make Char

Attached Char constructor

Source
_methods.scala
inline def toDouble: Double

Make Double

Make Double

Attached Double constructor

Source
_methods.scala
inline def toFloat: Float

Make Float

Make Float

Attached Float constructor

Source
_methods.scala
inline def toInt: Int

Make Int

Make Int

Attached Int constructor

Source
_methods.scala
inline def toLong: Long

Make Long

Make Long

Attached Long constructor

Source
_methods.scala
inline def toNumber: java.lang.Long

Make Number

Make Number

Attached Number constructor

Source
_methods.scala
inline def toShort: Short

Make Short

Make Short

Attached Short constructor

Source
_methods.scala

Make

inline def Big: BigInteger

Make BigInteger

Make BigInteger

BigInteger constructor attached to Long

Source
_methods.scala
inline def ByteCount: ByteCount

Make ByteCount

Make ByteCount

ByteCount constructor attached to Long

Source
_methods.scala
inline def Day: Time.Length

Make Time.Length

Make Time.Length

Time.Length constructor attached to Long

Source
_methods.scala
inline def Days: Time.Length

Make Time.Length

Make Time.Length

Time.Length constructor attached to Long

Source
_methods.scala
inline def Hour: Time.Length

Make Time.Length

Make Time.Length

Time.Length constructor attached to Long

Source
_methods.scala
inline def Hours: Time.Length

Make Time.Length

Make Time.Length

Time.Length constructor attached to Long

Source
_methods.scala
inline def Micros: Time.Length

Make Time.Length

Make Time.Length

Time.Length constructor attached to Long

Source
_methods.scala
inline def Millis: Time.Length

Make Time.Length

Make Time.Length

Time.Length constructor attached to Long

Source
_methods.scala
inline def Minute: Time.Length

Make Time.Length

Make Time.Length

Time.Length constructor attached to Long

Source
_methods.scala
inline def Minutes: Time.Length

Make Time.Length

Make Time.Length

Time.Length constructor attached to Long

Source
_methods.scala
inline def Nanos: Time.Length

Make Time.Length

Make Time.Length

Time.Length constructor attached to Long

Source
_methods.scala
inline def Percent: Percent

Make Percent

Make Percent

Percent constructor attached to Long

Source
_methods.scala
inline def Second: Time.Length

Make Time.Length

Make Time.Length

Time.Length constructor attached to Long

Source
_methods.scala
inline def Seconds: Time.Length

Make Time.Length

Make Time.Length

Time.Length constructor attached to Long

Source
_methods.scala
inline def Week: Time.Length

Make Time.Length

Make Time.Length

Time.Length constructor attached to Long

Source
_methods.scala
inline def Weeks: Time.Length

Make Time.Length

Make Time.Length

Time.Length constructor attached to Long

Source
_methods.scala
inline def Year: Year

Make Year

Make Year

Year constructor attached to Long

Source
_methods.scala