org.feijoas.mango.common.base

Functions

Related Doc: package base

object Functions

Utility functions for the work with Guava Function[T, R]

Usage example for conversion between Guava and Mango:

// convert a Guava function to a Scala function
val fnc: Function[T, R] = { (arg: T) => ... }.asJava

// convert a Scala function to a Guava function
val fnc: (T => R) = SomeGuavaFunction.asScala

// convert a Scala function to a Callable
val callable: Callable[R] = { () => n }.asJava

// convert a Scala functio to a Runnable
val runnable: Runnable = { () => ... }.asJava
Since

0.7

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Functions
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Value Members

  1. final def !=(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  4. implicit def asCallableConverter[R](fnc: () ⇒ R): AsJava[Callable[R]]

    Adds an asJava method that wraps a Scala function () => R in a Java Callable.

    Adds an asJava method that wraps a Scala function () => R in a Java Callable.

    All calls to the Callable are forwarded to the provided Scala function.

    fnc

    the Scala function () => R to wrap in a Java Callable

    returns

    An object with an asJava method that returns a Java Callable view of the argument.

  5. implicit def asGuavaFunctionConverter[T, R](fnc: (T) ⇒ R): AsJava[Function[T, R]]

    Adds an asJava method that wraps a Scala function T => R in a Guava Function[T, R].

    Adds an asJava method that wraps a Scala function T => R in a Guava Function[T, R].

    All calls to the Guava function are forwarded to the provided Scala function.

    fnc

    the Scala function T => R to wrap in a Guava Function[T, R]

    returns

    An object with an asJava method that returns a Guava Function[T, R] view of the argument.

  6. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  7. implicit def asMangoFunctionConverter[T, R](fnc: Function[T, R]): AsScala[(T) ⇒ R]

    Adds an asScala method that wraps a Guava Function[T, R] in a Scala function T => R.

    Adds an asScala method that wraps a Guava Function[T, R] in a Scala function T => R.

    All calls to the Scala function are forwarded to the provided Guava function.

    fnc

    the Guava Function[T, R] to wrap in a Scala funcion T => R

    returns

    An object with an asScala method that returns a Scala T => R view of the argument.

  8. implicit def asRunnableConverter(fnc: () ⇒ Unit): AsJava[Runnable]

    Adds an asJava method that wraps a Scala function () => Unit in a Java Runnable.

    Adds an asJava method that wraps a Scala function () => Unit in a Java Runnable.

    All calls to the Runnable are forwarded to the provided Scala function.

    fnc

    the Scala function () => Unit to wrap in a Java Runnable

    returns

    An object with an asJava method that returns a Java Runnable view of the argument.

  9. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  10. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  11. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  12. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  13. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  14. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  15. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  16. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  17. final def notify(): Unit

    Definition Classes
    AnyRef
  18. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  19. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  20. def toString(): String

    Definition Classes
    AnyRef → Any
  21. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  22. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  23. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped