object PosZDouble
The companion object for PosZDouble
that offers
factory methods that produce PosZDouble
s, implicit
widening conversions from PosZDouble
to other
numeric types, and maximum and minimum constant values for
PosZDouble
.
- Source
- PosZDouble.scala
- Alphabetic
- By Inheritance
- PosZDouble
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
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: PosZDouble
The largest value representable as a non-negative
Double
, which isPosZDouble(1.7976931348623157E308)
. -
final
val
MinValue: PosZDouble
The smallest value representable as a non-negative
Double
, which isPosZDouble(0.0)
. -
implicit macro
def
apply(value: Double): PosZDouble
A factory method, implemented via a macro, that produces a
PosZDouble
if passed a validDouble
literal, otherwise a compile time error.A factory method, implemented via a macro, that produces a
PosZDouble
if passed a validDouble
literal, otherwise a compile time error.The macro that implements this method will inspect the specified
Double
expression at compile time. If the expression is a non-negativeDouble
literal, i.e., with a value greater than or equal to 0, it will return aPosZDouble
representing that value. Otherwise, the passedDouble
expression is either a literal that is 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 inspectsDouble
literals at compile time, whereasfrom
inspectsDouble
values at run time.- value
the
Double
literal expression to inspect at compile time, and if non-negative, to return wrapped in aPosZDouble
at run time.- returns
the specified, valid
Double
literal value wrapped in aPosZDouble
. (If the specified expression is not a validDouble
literal, the invocation of this method will not compile.)
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
def
from(value: Double): Option[PosZDouble]
A factory method that produces an
Option[PosZDouble]
given aDouble
value.A factory method that produces an
Option[PosZDouble]
given aDouble
value.This method will inspect the passed
Double
value and if it is a non-negativeDouble
, i.e., a value greater than or equal to 0, it will return aPosZDouble
representing that value, wrapped in aSome
. Otherwise, the passedDouble
value is negative, so this method will returnNone
.This factory method differs from the
apply
factory method in thatapply
is implemented via a macro that inspectsDouble
literals at compile time, whereasfrom
inspectsDouble
values at run time.- value
the
Double
to inspect, and if non-negative, return wrapped in aSome[PosZDouble]
.- returns
the specified
Double
value wrapped in aSome[PosZDouble]
, if it is positive, elseNone
.
-
final
def
getClass(): Class[_]
- 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
posZDoubleOrd: Ordering[PosZDouble]
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( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
implicit
def
widenToDouble(poz: PosZDouble): Double
Implicit widening conversion from
PosZDouble
toDouble
.Implicit widening conversion from
PosZDouble
toDouble
.- returns
the
Double
value underlying the specifiedPosZDouble
.