Skip to content

Instantly share code, notes, and snippets.

@cored
Created June 30, 2009 15:19
Show Gist options
  • Save cored/138214 to your computer and use it in GitHub Desktop.
Save cored/138214 to your computer and use it in GitHub Desktop.
import org.apache.commons.lang.Validate;
public class Person {
private String name;
public Person(String name) { this.name = name; }
public void setPersonInformation(String name, String[] address, int age) {
Validate.notEmpty(name, "Name should not be null");
Validate.noNullElements( address, "Address cannot contain null elements" );
Validate.isTrue(age > 10, "Age must be greater than 10");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment