Package

com.ibm.streamsx.topology

functions

Permalink

package functions

Implicit conversions for IBM Streams Scala applications.

Importing com.ibm.streamsx.topology.functions.FunctionConversions, allows Scala functions to be used as functions used to transform, filter tuples etc.

import com.ibm.streamsx.topology.functions.FunctionConversions._

Here's a code extract (from simple.FilterEchoScala) that implicitly converts the Scala anonymous function (v:String) => v.startsWith("d") to a com.ibm.streamsx.topology.function.Predicate instance required by the TStream.filter method.

// Implicit conversions of Scala anonymous functions
// to functions for the Java Application API
import com.ibm.streamsx.topology.functions.FunctionConversions._

object FilterEchoScala {
  def main(args: Array[String]) {
    val topology = new Topology("FilterEchoScala")

    var echo = topology.strings(args:_*)

    echo = echo.filter((v:String) => v.startsWith("d"))
Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. functions
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Value Members

  1. object FunctionConversions

    Permalink

    Implicit function conversions for Scala to allow use of the IBM Streams Java Application API.

Inherited from AnyRef

Inherited from Any

Ungrouped