implicit final class ConvenientInt extends AnyVal
This class extends the interface of Int
with convenience methods.
- Alphabetic
- By Inheritance
- ConvenientInt
- AnyVal
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new ConvenientInt(value: Int)
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- Any
- final def ##(): Int
- Definition Classes
- Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def atLeast(minimum: Int): Int
num atLeast limit
is equivalent tonum.max(limit)
. - def atMost(maximum: Int): Int
num atMost limit
is equivalent tonum.min(limit)
. - def clamp(low: Int, high: Int): Int
num.clamp(low, high)
is equivalent tonum.max(low).min(high)
. - def getClass(): Class[_ <: AnyVal]
- Definition Classes
- AnyVal → Any
- def isBetween(low: Int, high: Int): Boolean
Determines if the at least as large as
low
and less thanhigh
.Determines if the at least as large as
low
and less thanhigh
. Note that the lower bound is inclusive and the upper bound exclusive. - def isEven: Boolean
Determines if the integer is divisible by two.
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def isOdd: Boolean
Determines if the integer isn’t divisible by two.
- def toString: String
- Definition Classes
- Any