Skip to content

Instantly share code, notes, and snippets.

@liviutudor
Created September 21, 2017 05:46
Show Gist options
  • Select an option

  • Save liviutudor/4d631195eefc98b327921196c6f63c91 to your computer and use it in GitHub Desktop.

Select an option

Save liviutudor/4d631195eefc98b327921196c6f63c91 to your computer and use it in GitHub Desktop.

Revisions

  1. liviutudor created this gist Sep 21, 2017.
    12 changes: 12 additions & 0 deletions BeanTwo.groovy
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,12 @@
    import groovy.transform.Sortable
    import groovy.transform.TupleConstructor

    @Sortable
    @TupleConstructor
    class BeanTwo {
    int yob

    public int getAge() {
    new Date().year - yob
    }
    }