Exceptions are probably the best way to go. That way, whomever uses your class will get a well known, standardized notification that what they are attempting is a no no.
You should make your own custom Exception (e.g., `OverFooListLimitException`). Do include *Exception* at the end of your custom exception class name, so that everyone who sees it will know the purpose of this class.
public class MyOwnException extends Exception {
public MyOwnException () {
}
public MyOwnException (String message) {
super (message);
}
public MyOwnException (Throwable cause) {
super (cause);
}
public MyOwnException (String message, Throwable cause) {
super (message, cause);
}
}
Replace the `MyOwnException` with whatever you name your custom exception.
Example Custom Exception came from [How to create a custom exception type in Java?][1]
[1]: http://stackoverflow.com/a/8423743/848058