Uploaded image for project: 'Commons Geometry'
  1. Commons Geometry
  2. GEOMETRY-125

DoubleFormats Builder

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Invalid
    • None
    • None
    • None
    • None

    Description

      Use a Builder class in DoubleFormats to make the API more self-documenting. Ex:

      // current
      DoubleFunction<String> def = DoubleFormats.createDefault(5, -3);
      DoubleFunction<String> sci = DoubleFormats.createScientific(5, -3);
      
      // new
      DoubleFunction<String> def = DoubleFormats.builder()
          .withMaxPrecision(5)
          .withMinExponent(-3)
          .build();
      
      DoubleFunction<String> sci = DoubleFormats.builder()
          .withMaxPrecision(5)
          .withMinExponent(-3)
          .buildScientific();
      

       

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              mattjuntunen Matt Juntunen
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: