Uploaded image for project: 'Flink'
  1. Flink
  2. FLINK-2359

Add factory methods to the Java TupleX types

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 0.10.0
    • 0.10.0
    • None
    • None

    Description

      The compiler doesn't infer generic type arguments from constructor arguments, which means that we have to call Tuple constructors like this:

      Tuple2<Integer, String> = new Tuple2<Integer, String>(5, "foo");

      I propose adding a factory method, which would provide the following alternative:

      Tuple2<Integer, String> = Tuple2.create(5, "foo");

      (Note that C++ and C# Tuples also have similar factory methods for the same reason.)

      Attachments

        Activity

          People

            ggevay Gábor Gévay
            ggevay Gábor Gévay
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: