You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Jochen Kemnade (JIRA)" <ji...@apache.org> on 2015/08/19 14:21:45 UTC
[jira] [Created] (GROOVY-7552) add
org.codehaus.groovy.runtime.DefaultGroovyMethods.isEmpty(Iterable)
Jochen Kemnade created GROOVY-7552:
--------------------------------------
Summary: add org.codehaus.groovy.runtime.DefaultGroovyMethods.isEmpty(Iterable)
Key: GROOVY-7552
URL: https://issues.apache.org/jira/browse/GROOVY-7552
Project: Groovy
Issue Type: Improvement
Reporter: Jochen Kemnade
{code}
def items = [1]
def iterable = { [ hasNext:{ !items.isEmpty() }, next:{ items.pop() } ] as Iterator } as Iterable
assert !iterable.isEmpty()
iterable.next()
assert iterable.isEmpty()
{code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)