gearpump-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From huafengw <...@git.apache.org>
Subject [GitHub] incubator-gearpump pull request #131: [GEARPUMP-262] Add setup and teardown ...
Date Fri, 13 Jan 2017 07:25:04 GMT
Github user huafengw commented on a diff in the pull request:

    https://github.com/apache/incubator-gearpump/pull/131#discussion_r95947926
  
    --- Diff: streaming/src/main/scala/org/apache/gearpump/streaming/dsl/api/functions/FilterFunction.scala
---
    @@ -15,17 +15,28 @@
      * See the License for the specific language governing permissions and
      * limitations under the License.
      */
    +package org.apache.gearpump.streaming.dsl.api.functions
     
    -package org.apache.gearpump.streaming.javaapi.dsl.functions;
    +import org.apache.gearpump.streaming.dsl.scalaapi.functions.SerializableFunction
     
    -import java.io.Serializable;
    +object FilterFunction {
    +
    +  def apply[T](fn: T => Boolean): FilterFunction[T] = {
    +    new FilterFunction[T] {
    +      override def apply(t: T): Boolean = {
    +        fn(t)
    +      }
    +    }
    +  }
    +}
     
     /**
    - * Function that map a value of type T to value of type R
    + * Returns true to keep the input and false otherwise.
      *
    - * @param <T> Input value type
    - * @param <R> Output value type
    + * @tparam T Input value type
    --- End diff --
    
    typo?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message