This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Grapes(Grab(group='com.bloidonia', module='groovy-common-extensions', version='0.4.1')) | |
def f = new File('test.zip') | |
f.unzip(new File('test')) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Grab(group='org.gcontracts', module='gcontracts', version='[1.1.1,)') | |
import org.gcontracts.annotations.* | |
@Invariant({ elements != null }) | |
class Stack { | |
private List elements | |
@Ensures({ is_empty() }) | |
public Stack() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Grab(group='org.gcontracts', module='gcontracts', version='[1.1.0,)') | |
import org.gcontracts.annotations.Invariant | |
@Invariant({ firstName != null && lastName != null }) | |
class Person { | |
String firstName | |
String lastName | |
def Person(final String firstName, final String lastName) { | |
this.firstName = firstName |
NewerOlder