Uploaded image for project: 'Groovy'
  1. Groovy
  2. GROOVY-2067

Truth as a method.

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.1-beta-2
    • 2.0.0
    • syntax
    • None
    • Ubuntu 7.04, Java 1.6.01, Groovy 1.0

    Description

      With isCase method, you could do any type become a classifier for switch-case statements. Groovy should deals with truth the same way providing a method that checks truth.

      This could avoid problems like that:
      http://thread.gmane.org/gmane.comp.lang.groovy.devel/8507/focus=8519

      And provides to users a way to do any class become a classifier for conditional statements. The possible names to the methods are:
      1. isTrue
      2. checkTruth
      3. truth
      4. $isTrue
      5. truth
      6. asBool

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              jackganzha Marcos Silva Pereira
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: