Created
June 30, 2009 15:19
-
-
Save cored/138214 to your computer and use it in GitHub Desktop.
This file contains 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
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