Java7 code snippet