Uploaded image for project: 'Kite SDK'
  1. Kite SDK
  2. KITE-204

Change Builder#get to Builder#build

    Details

    • Type: Task
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 0.8.0
    • Fix Version/s: 0.9.0
    • Component/s: Data Module
    • Labels:
      None

      Description

      Most of the Builder classes implement Supplier and define a get method that builds an instance. This adds an API dependency on guava and isn't as clear as using build, which is what most of guava and other libraries use for naming the build method. This is also a problem for implementing a typed Dataset interface because it forces the Builder classes to be parameterized rather than introducing types by inference when the get/build method is called:

      // this is required
      Dataset<Record> dataset = new Builder<Record>().get();  // (1)
      // instead of
      Dataset<Record> dataset = new Builder().get();          // (2)
      

      The parameter-less version (2) matches the load/update signature:

      Dataset<Record> dataset = repo.load("records");
      

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              blue Ryan Blue
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: