object TimesOnInt extends TimesOnInt
Companion object that facilitates the importing of TimesOnInt members as an alternative to mixing it in.
One use case of this companion object is to import TimesOnInt members so you can use them in the Scala interpreter.
Here's an example:
scala> import org.scalatest.TimesOnInt._
import org.scalatest.TimesOnInt._
scala> 3 times println("Hello again, world!")
Hello again, world!
Hello again, world!
Hello again, world!
- Source
- TimesOnInt.scala
- Alphabetic
- By Inheritance
- TimesOnInt
- TimesOnInt
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Type Members
-
class
Repeater extends AnyRef
Class used via an implicit conversion to enable a
timesmethod to be invoked onInts to repeat a given side-effecting operation multiple times.Class used via an implicit conversion to enable a
timesmethod to be invoked onInts to repeat a given side-effecting operation multiple times.When an instance of this class is constructed, 0 and any positive number may be passed as
num, but a negative number will result in anIllegalArgumentException. If constructed with 0, thetimesmethod on the resulting instance will return without invoking the function passed to it. If constructed with 1, thetimesmethod will invoke the function passed to it once then return.- Definition Classes
- TimesOnInt
- Exceptions thrown
IllegalArgumentExceptionifnumis less than zero.
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
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
implicit
def
convertIntToRepeater(num: Int): Repeater
Implicit conversion that adds a
timesmethod toInts that will repeat a given side-effecting operation multiple times.Implicit conversion that adds a
timesmethod toInts that will repeat a given side-effecting operation multiple times.- num
the integer to which the
timesmethod will be added.
- Definition Classes
- TimesOnInt
-
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] )
-
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()
-
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( ... )