Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id C0CE7200BF8 for ; Fri, 13 Jan 2017 16:58:43 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id BF766160B3F; Fri, 13 Jan 2017 15:58:43 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 3B8E6160B32 for ; Fri, 13 Jan 2017 16:58:43 +0100 (CET) Received: (qmail 57890 invoked by uid 500); 13 Jan 2017 15:58:42 -0000 Mailing-List: contact dev-help@gearpump.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@gearpump.incubator.apache.org Delivered-To: mailing list dev@gearpump.incubator.apache.org Delivered-To: moderator for dev@gearpump.incubator.apache.org Received: (qmail 71174 invoked by uid 99); 13 Jan 2017 07:25:07 -0000 X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -7.019 X-Spam-Level: X-Spam-Status: No, score=-7.019 tagged_above=-999 required=6.31 tests=[KAM_LAZY_DOMAIN_SECURITY=1, RCVD_IN_DNSWL_HI=-5, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RP_MATCHES_RCVD=-2.999] autolearn=disabled From: huafengw To: dev@gearpump.incubator.apache.org Reply-To: dev@gearpump.incubator.apache.org References: In-Reply-To: Subject: [GitHub] incubator-gearpump pull request #131: [GEARPUMP-262] Add setup and teardown ... Content-Type: text/plain Message-Id: <20170113072504.1A641DFA9D@git1-us-west.apache.org> Date: Fri, 13 Jan 2017 07:25:04 +0000 (UTC) archived-at: Fri, 13 Jan 2017 15:58:43 -0000 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 Input value type - * @param 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. ---