Uploaded image for project: 'Thrift'
  1. Thrift
  2. THRIFT-540

Have set methods return reference to self

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 0.2
    • Java - Compiler
    • None
    • Patch Available

    Description

      Sometimes its useful to be able to make a single or string of modifications to a thrift object inline. Having set methods return a reference to itself allows for syntactic sugar like this:

      myThriftObject.set_field1(...).set_field2(...)

      getObjectFromHelperMethod().set_field2(...)

      Attachments

        1. thrift-540.patch
          0.8 kB
          Bryan Duxbury

        Activity

          People

            bryanduxbury Bryan Duxbury
            marz Nathan Marz
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: