Provides implicit org.scalacheck.Gen.Choose instances
Type members
Classlikes
Value members
Concrete methods
Transform a Choose[T] to a Choose[U] where T and U are two isomorphic types whose relationship is described by the provided transformation functions. (exponential functor map)
Transform a Choose[T] to a Choose[U] where T and U are two isomorphic types whose relationship is described by the provided transformation functions. (exponential functor map)
- Source:
- Gen.scala
Implicits
Implicits
Choose a BigDecimal number between two given numbers.
Choose a BigDecimal number between two given numbers.
The minimum scale used will be 34. That means that the fractional part will have at least 34 digits (more if one of the given numbers has a scale larger than 34).
The minimum scale was chosen based on Scala's default scale for expanding infinite fractions:
BigDecimal(1) / 3 // 0.3333333333333333333333333333333333
See chooseBigDecimalScale for more information about scale.
- Source:
- Gen.scala
Choose a java.math.BigDecimal number between two given numbers.
Choose a java.math.BigDecimal number between two given numbers.
See chooseBigDecimal and chooseBigDecimalScale for more comments.
- Source:
- Gen.scala
Inherited implicits
ZoneOffset values have some unusual semantics when it comes to
ordering. The short explanation is that (ZoneOffset.MAX < ZoneOffset.MIN) == true
. This is because for any given LocalDateTime
,
that time applied to ZoneOffset.MAX
will be an older moment in time
than that same LocalDateTime
applied to ZoneOffset.MIN
.
ZoneOffset values have some unusual semantics when it comes to
ordering. The short explanation is that (ZoneOffset.MAX < ZoneOffset.MIN) == true
. This is because for any given LocalDateTime
,
that time applied to ZoneOffset.MAX
will be an older moment in time
than that same LocalDateTime
applied to ZoneOffset.MIN
.
From the JavaDoc,
"The offsets are compared in the order that they occur for the same time of day around the world. Thus, an offset of +10:00 comes before an offset of +09:00 and so on down to -18:00."
This has the following implication,
scala> ZoneOffset.MIN
val res0: java.time.ZoneOffset = -18:00
scala> ZoneOffset.MAX
val res1: java.time.ZoneOffset = +18:00
scala> ZoneOffset.MIN.compareTo(ZoneOffset.MAX)
val res3: Int = 129600
This implementation is consistent with that comparison.
- See also:
- Inherited from:
- JavaTimeChoose (hidden)
- Source:
- JavaTimeChoose.scala