Details
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
- duplicates
-
GROOVY-982 provide a general isTrue() analogous to isCase()
- Closed