thingies is a collection, so you have everything from Collection at your disposal.
In a simple way, you can do this:
def one = myInstance.thingies.asList().first()
However, you probably want to make sure that the collection does have some elements. The documentation does not explicitly state that first() throws an IndexOutOfBoundsException if the list is empty, but I feel it is still possible. If this happens, you probably want to:
def one = myInstance.thingies.size() > 0 ? myInstance.thingies.asList().first() : null
Or, if you want to be super-concise due to some readability, you can use this approach ( courtesy of John Wagenleitner) :
def one = myInstance.thingies?.find { true }
source share