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

provide a general isTrue() analogous to isCase()

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Duplicate
    • 1.0-JSR-2
    • 1.7-beta-2
    • groovy-jdk
    • None

    Description

      Objects should be able to implement their own logic about being true or false.
      asBool() can be simplified.
      e.g. Collections can implement isTrue() as size()>0, Maps as !isEmpty(), etc.

      Attachments

        Issue Links

          Activity

            People

              guillaume Guillaume Sauthier
              codevise Dierk König
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: