beam-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Luke Cwik (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (BEAM-1223) Add static factory methods for Sum.[*]Fn classes
Date Tue, 10 Jan 2017 16:47:58 GMT

    [ https://issues.apache.org/jira/browse/BEAM-1223?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15815469#comment-15815469
] 

Luke Cwik edited comment on BEAM-1223 at 1/10/17 4:47 PM:
----------------------------------------------------------

Interfaces and base classes can't be used to enforce the presence of static methods in java.

I do believe this pattern could be extended to the other PTransforms.


was (Author: lcwik):
Interfaces and base classes can't be used to enforce the presence of static methods in java.

I do believe should a pattern could be extended to the other PTransforms.

> Add static factory methods for Sum.[*]Fn classes
> ------------------------------------------------
>
>                 Key: BEAM-1223
>                 URL: https://issues.apache.org/jira/browse/BEAM-1223
>             Project: Beam
>          Issue Type: Improvement
>          Components: sdk-java-core
>            Reporter: Stas Levin
>            Assignee: Stas Levin
>            Priority: Minor
>
> {{Sum.SumDoubleFn}}, {{SumIntegerFn}} and {{SumLongFn}} are not using the {{X.of()}}
or {{X.from()}} or other instance creation via static method patterns that are ubiquitous
in Beam.
> Following a discussion on the dev list, it would be great to preserve a consistent look
and feel and change the creation patterns for these classes to something like {{SumFn.ofLong()}}
etc.
> See also the corresponding [dev list thread|https://lists.apache.org/thread.html/5d8e905ee49b116d13811c2a96da65eeb44ab7c002870f50936ee1ad@%3Cdev.beam.apache.org%3E].



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message