Thrift
  1. Thrift
  2. THRIFT-540

Have set methods return reference to self

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.2
    • Component/s: Java - Compiler
    • Labels:
      None
    • Patch Info:
      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(...)

      1. thrift-540.patch
        0.8 kB
        Bryan Duxbury

        Activity

        Jake Farrell made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Bryan Duxbury made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Bryan Duxbury made changes -
        Assignee Bryan Duxbury [ bryanduxbury ]
        Fix Version/s 0.2 [ 12313769 ]
        Patch Info [Patch Available]
        Bryan Duxbury made changes -
        Field Original Value New Value
        Attachment thrift-540.patch [ 12414941 ]
        Nathan Marz created issue -

          People

          • Assignee:
            Bryan Duxbury
            Reporter:
            Nathan Marz
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development