flink-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From uce <...@git.apache.org>
Subject [GitHub] incubator-flink pull request: FIX-FLINK-888-swapValues() for Tuple...
Date Wed, 25 Jun 2014 15:44:58 GMT
Github user uce commented on the pull request:

    I suggest to create a new Tuple2 for the swap, because your current solution only works
because of type erasure.
    The following would not work:
    Tuple2<String, Integer> classUnderTestTuple2 = new Tuple2<String, Integer>(new
String("Test case"), 25);
    String s1 = classUnderTestTuple2.f1; // does not work
    Integer i1 = classUnderTestTuple2.f0; // does not work
    So for swapValues() you would do something like `new Tuple2<T1, T0>(T1, T0)`.

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.

View raw message