Packages

c

ostrat

IntExtensions

final class IntExtensions extends AnyVal

Extension methods for Int.

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. IntExtensions
  2. AnyVal
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new IntExtensions(thisInt: Int)

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    Any
  2. final def ##: Int
    Definition Classes
    Any
  3. def %%(divisor: Int): Int

    More useful definition of modulus where a negative number divided by a positive divisor produces a non negative modulus.

  4. final def ==(arg0: Any): Boolean
    Definition Classes
    Any
  5. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  6. def billion: Long
  7. def commaInts(otherInts: Int*): String
  8. def degreesToRadians: Double
    Annotations
    @inline()
  9. def diff(operand: Int): Int
  10. def div2: Int
  11. def div2RoundDown: Int
  12. def div2RoundUp: Int
  13. def div4: Int
  14. def div4Rem0: Boolean

    Dividing by 4 gives remainder of 0.

  15. def div4Rem1: Boolean
  16. def div4Rem2: Boolean

    Dividing by 4 gives remainder of 2.

  17. def div4Rem3: Boolean
  18. def div8Rem2: Boolean
  19. def div8Rem4: Boolean
  20. def div8Rem6: Boolean
  21. def divRoundUp(operand: Int): Int

    Divides rounding up.

    Divides rounding up. 11.divRoundUp(10) == 2;

  22. def doTimes(f: () => Unit): Unit
  23. def foldTo[A](toValue: Int, initialValue: A)(f: (A, Int) => A): A

    folds across the Integer range starting with this Int to the given end of range.

  24. def foldUntil[A](untilValue: Int, initialValue: A)(f: (A, Int) => A): A

    folds across the Integer range starting with this Int until the given end of range.

  25. def getClass(): Class[_ <: AnyVal]
    Definition Classes
    AnyVal → Any
  26. def hexStr: String
    Annotations
    @inline()
  27. def hexStr2: String
    Annotations
    @inline()
  28. def hundredthsStr(hundreds: Int): String
  29. def ifEven[A](vEven: => A, vOdd: => A): A
  30. def ifMod(predicate: Boolean, f: (Int) => Int): Int
    Annotations
    @inline()
  31. def ifOdd[A](vOdd: => A, vEven: => A): A
  32. def ifSumEven[A](evenVal: => A, oddVal: => A, operand: Int): A
  33. def ifSumOdd[A](oddVal: => A, evenVal: => A, operand: Int): A
  34. def ifZero[A](vZero: => A, vNonZero: => A): A
  35. def isDivBy3: Boolean
  36. def isDivBy8: Boolean
  37. def isEven: Boolean
  38. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  39. def isOdd: Boolean
  40. def max0: Int
  41. def million: Int
  42. def min0: Int
  43. def neg: Boolean
  44. def pos: Boolean
  45. def power(operand: Int): Int

    Only use positive value that won't overflow int)

  46. def quadrillion: Long
  47. def radiansToDegrees: Double
    Annotations
    @inline()
  48. def roundDownTo(f: (Int) => Boolean): Int

    Decrements the value of an integer while that integer does not match condition.

    Decrements the value of an integer while that integer does not match condition. Not guaranteed to terminate.

  49. def roundDownToEven: Int
  50. def roundDownToOdd: Int
  51. def roundUpTo(f: (Int) => Boolean): Int

    Increments the value of an integer while that integer does not match condition.

    Increments the value of an integer while that integer does not match condition. Not guaranteed to terminate.

  52. def roundUpToEven: Int
  53. def roundUpToOdd: Int
  54. def semicolonInts(otherInts: Int*): String
  55. def spaces: String
  56. def str2Dig: String
  57. def tenthsStr(tenths: Int): String
  58. val thisInt: Int
  59. def toString(): String
    Definition Classes
    Any
  60. def trillion: Long

Inherited from AnyVal

Inherited from Any

Ungrouped