object PosLong
The companion object for PosLong
that offers
factory methods that produce PosLong
s, implicit
widening conversions from PosLong
to other
numeric types, and maximum and minimum constant values for
PosLong
.
- Source
- PosLong.scala
- Alphabetic
- By Inheritance
- PosLong
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final val MaxValue: PosLong
The largest value representable as a positive
Long
, which isPosLong(9223372036854775807)
. - final val MinValue: PosLong
The smallest value representable as a positive
Long
, which isPosLong(1L)
. - implicit macro def apply(value: Long): PosLong
A factory method, implemented via a macro, that produces a
PosLong
if passed a validLong
literal, otherwise a compile time error.A factory method, implemented via a macro, that produces a
PosLong
if passed a validLong
literal, otherwise a compile time error.The macro that implements this method will inspect the specified
Long
expression at compile time. If the expression is a positiveLong
literal, i.e., with a value greater than 0, it will return aPosLong
representing that value. Otherwise, the passedLong
expression is either a literal that is 0 or negative, or is not a literal, so this method will give a compiler error.This factory method differs from the
from
factory method in that this method is implemented via a macro that inspectsLong
literals at compile time, whereasfrom
inspectsLong
values at run time.- value
the
Long
literal expression to inspect at compile time, and if positive, to return wrapped in aPosLong
at run time.- returns
the specified, valid
Long
literal value wrapped in aPosLong
. (If the specified expression is not a validLong
literal, the invocation of this method will not compile.)
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- def from(value: Long): Option[PosLong]
A factory method that produces an
Option[PosLong]
given aLong
value.A factory method that produces an
Option[PosLong]
given aLong
value.This method will inspect the passed
Long
value and if it is a positiveLong
, i.e., a value greater than 0, it will return aPosLong
representing that value, wrapped in aSome
. Otherwise, the passedLong
value is 0 or negative, so this method will returnNone
.This factory method differs from the
apply
factory method in thatapply
is implemented via a macro that inspectsLong
literals at compile time, whereasfrom
inspectsLong
values at run time.- value
the
Long
to inspect, and if positive, return wrapped in aSome[PosLong]
.- returns
the specified
Long
value wrapped in aSome[PosLong]
, if it is positive, elseNone
.
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- implicit val posLongOrd: Ordering[PosLong]
Implicit Ordering instance.
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- implicit def widenToDouble(pos: PosLong): Double
Implicit widening conversion from
PosLong
toDouble
.Implicit widening conversion from
PosLong
toDouble
.- pos
the
PosLong
to widen- returns
the
Long
value underlying the specifiedPosLong
, widened toDouble
.
- implicit def widenToFloat(pos: PosLong): Float
Implicit widening conversion from
PosLong
toFloat
.Implicit widening conversion from
PosLong
toFloat
.- pos
the
PosLong
to widen- returns
the
Long
value underlying the specifiedPosLong
, widened toFloat
.
- implicit def widenToLong(pos: PosLong): Long
Implicit widening conversion from
PosLong
toLong
.Implicit widening conversion from
PosLong
toLong
.- pos
the
PosLong
to widen- returns
the
Long
value underlying the specifiedPosLong
.
- implicit def widenToPosDouble(pos: PosLong): PosDouble
Implicit widening conversion from
PosLong
toPosDouble
.Implicit widening conversion from
PosLong
toPosDouble
.- pos
the
PosLong
to widen- returns
the
Long
value underlying the specifiedPosLong
, widened toDouble
and wrapped in aPosDouble
.
- implicit def widenToPosFloat(pos: PosLong): PosFloat
Implicit widening conversion from
PosLong
toPosFloat
.Implicit widening conversion from
PosLong
toPosFloat
.- pos
the
PosLong
to widen- returns
the
Long
value underlying the specifiedPosLong
, widened toFloat
and wrapped in aPosFloat
.
- implicit def widenToPosZDouble(pos: PosLong): PosZDouble
Implicit widening conversion from
PosLong
toPosZDouble
.Implicit widening conversion from
PosLong
toPosZDouble
.- pos
the
PosLong
to widen- returns
the
Long
value underlying the specifiedPosLong
, widened toDouble
and wrapped in aPosZDouble
.
- implicit def widenToPosZFloat(pos: PosLong): PosZFloat
Implicit widening conversion from
PosLong
toPosZFloat
.Implicit widening conversion from
PosLong
toPosZFloat
.- pos
the
PosLong
to widen- returns
the
Long
value underlying the specifiedPosLong
, widened toFloat
and wrapped in aPosZFloat
.
- implicit def widenToPosZLong(pos: PosLong): PosZLong
Implicit widening conversion from
PosLong
toPosZLong
.Implicit widening conversion from
PosLong
toPosZLong
.- pos
the
PosLong
to widen- returns
the
Long
value underlying the specifiedPosLong
wrapped in aPosZLong
.