Packages

c

scala.runtime

RichInt

final class RichInt extends AnyVal with ScalaNumberProxy[Int] with RangedProxy[Int]

Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. RichInt
  2. RangedProxy
  3. ScalaNumberProxy
  4. OrderedProxy
  5. Ordered
  6. Comparable
  7. Typed
  8. Proxy
  9. ScalaNumericAnyConversions
  10. AnyVal
  11. Any
Implicitly
  1. by any2stringadd
  2. by StringFormat
  3. by Ensuring
  4. by ArrowAssoc
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new RichInt(self: Int)

Type Members

  1. type ResultWithoutStep = collection.immutable.Range
    Definition Classes
    RichIntRangedProxy

Value Members

  1. def <(that: Int): Boolean

    Returns true if this is less than that

    Returns true if this is less than that

    Definition Classes
    Ordered
  2. def <=(that: Int): Boolean

    Returns true if this is less than or equal to that.

    Returns true if this is less than or equal to that.

    Definition Classes
    Ordered
  3. def >(that: Int): Boolean

    Returns true if this is greater than that.

    Returns true if this is greater than that.

    Definition Classes
    Ordered
  4. def >=(that: Int): Boolean

    Returns true if this is greater than or equal to that.

    Returns true if this is greater than or equal to that.

    Definition Classes
    Ordered
  5. def abs: Int

    Returns the absolute value of this.

    Returns the absolute value of this.

    Definition Classes
    RichIntScalaNumberProxy
  6. def byteValue(): Byte
  7. def compare(y: Int): Int

    Result of comparing this with operand that.

    Result of comparing this with operand that.

    Implement this method to determine how instances of A will be sorted.

    Returns x where:

    • x < 0 when this < that
    • x == 0 when this == that
    • x > 0 when this > that
    Definition Classes
    OrderedProxyOrdered
  8. def compareTo(that: Int): Int

    Result of comparing this with operand that.

    Result of comparing this with operand that.

    Definition Classes
    Ordered → Comparable
  9. def doubleValue(): Double
  10. def floatValue(): Float
  11. def getClass(): Class[_ <: AnyVal]

    Returns the runtime class representation of the object.

    Returns the runtime class representation of the object.

    returns

    a class object corresponding to the runtime type of the receiver.

    Definition Classes
    AnyValAny
  12. def intValue(): Int
  13. def isValidByte: Boolean

    Returns true iff this has a zero fractional part, and is within the range of scala.Byte MinValue and MaxValue; otherwise returns false.

    Returns true iff this has a zero fractional part, and is within the range of scala.Byte MinValue and MaxValue; otherwise returns false.

    Definition Classes
    ScalaNumericAnyConversions
  14. def isValidChar: Boolean

    Returns true iff this has a zero fractional part, and is within the range of scala.Char MinValue and MaxValue; otherwise returns false.

    Returns true iff this has a zero fractional part, and is within the range of scala.Char MinValue and MaxValue; otherwise returns false.

    Definition Classes
    ScalaNumericAnyConversions
  15. def isValidInt: Boolean

    Returns true iff this has a zero fractional part, and is within the range of scala.Int MinValue and MaxValue; otherwise returns false.

    Returns true iff this has a zero fractional part, and is within the range of scala.Int MinValue and MaxValue; otherwise returns false.

    Definition Classes
    RichIntScalaNumericAnyConversions
  16. def isValidLong: Boolean
  17. def isValidShort: Boolean

    Returns true iff this has a zero fractional part, and is within the range of scala.Short MinValue and MaxValue; otherwise returns false.

    Returns true iff this has a zero fractional part, and is within the range of scala.Short MinValue and MaxValue; otherwise returns false.

    Definition Classes
    ScalaNumericAnyConversions
  18. def isWhole(): Boolean

    Returns true if this number has no decimal component.

    Returns true if this number has no decimal component. Always true for RichInt.

    returns

    true if this number has no decimal component, false otherwise.

    Definition Classes
    RichIntScalaNumericAnyConversions
  19. def longValue(): Long
  20. def max(that: Int): Int

    Returns this if this > that or that otherwise.

    Returns this if this > that or that otherwise.

    Definition Classes
    RichIntScalaNumberProxy
  21. def min(that: Int): Int

    Returns this if this < that or that otherwise.

    Returns this if this < that or that otherwise.

    Definition Classes
    RichIntScalaNumberProxy
  22. val self: Int
    Definition Classes
    RichIntTypedProxy
  23. def shortValue(): Short
  24. def signum: Int

    Returns the signum of this.

    Returns the signum of this.

    Definition Classes
    RichIntScalaNumberProxy
  25. def to(end: Int, step: Int): Inclusive

    end

    The final bound of the range to make.

    step

    The number to increase by for each step of the range.

    returns

    A scala.collection.immutable.Range from this up to and including end.

    Definition Classes
    RichIntRangedProxy
  26. def to(end: Int): Inclusive

    end

    The final bound of the range to make.

    returns

    A scala.collection.immutable.Range from this up to and including end.

    Definition Classes
    RichIntRangedProxy
  27. def toBinaryString: String
  28. def toByte: Byte

    Returns the value of this as a scala.Byte.

    Returns the value of this as a scala.Byte. This may involve rounding or truncation.

    Definition Classes
    ScalaNumericAnyConversions
  29. def toChar: Char

    Returns the value of this as a scala.Char.

    Returns the value of this as a scala.Char. This may involve rounding or truncation.

    Definition Classes
    ScalaNumericAnyConversions
  30. def toDouble: Double

    Returns the value of this as a scala.Double.

    Returns the value of this as a scala.Double. This may involve rounding or truncation.

    Definition Classes
    ScalaNumericAnyConversions
  31. def toFloat: Float

    Returns the value of this as a scala.Float.

    Returns the value of this as a scala.Float. This may involve rounding or truncation.

    Definition Classes
    ScalaNumericAnyConversions
  32. def toHexString: String
  33. def toInt: Int

    Returns the value of this as an scala.Int.

    Returns the value of this as an scala.Int. This may involve rounding or truncation.

    Definition Classes
    ScalaNumericAnyConversions
  34. def toLong: Long

    Returns the value of this as a scala.Long.

    Returns the value of this as a scala.Long. This may involve rounding or truncation.

    Definition Classes
    ScalaNumericAnyConversions
  35. def toOctalString: String
  36. def toShort: Short

    Returns the value of this as a scala.Short.

    Returns the value of this as a scala.Short. This may involve rounding or truncation.

    Definition Classes
    ScalaNumericAnyConversions
  37. def toString(): String

    Returns a string representation of the object.

    Returns a string representation of the object.

    The default representation is platform dependent.

    returns

    a string representation of the object.

    Definition Classes
    ProxyAny
  38. def underlying(): AnyRef
  39. def until(end: Int, step: Int): collection.immutable.Range

    end

    The final bound of the range to make.

    step

    The number to increase by for each step of the range.

    returns

    A scala.collection.immutable.Range from this up to but not including end.

    Definition Classes
    RichIntRangedProxy
  40. def until(end: Int): collection.immutable.Range

    end

    The final bound of the range to make.

    returns

    A scala.collection.immutable.Range from this up to but not including end.

    Definition Classes
    RichIntRangedProxy

Deprecated Value Members

  1. def round: Int

    There is no reason to round an Int, but this method is provided to avoid accidental loss of precision from a detour through Float.

    There is no reason to round an Int, but this method is provided to avoid accidental loss of precision from a detour through Float.

    Annotations
    @deprecated
    Deprecated

    (Since version 2.11.0) this is an integer type; there is no reason to round it. Perhaps you meant to call this on a floating-point value?