/**
* Replacing the Constants Interface as it is bad practice:
* "Constant Interface Antipattern's problem is that a class's use of
* the static members of another class is a mere implementation detail.
* When a class implements an interface, it becomes part of the class's public API.
* Implementation details should not leak into public APIs."
*
* -http://java.sun.com/j2se/1.5.0/docs/guide/language/static-import.html
*
* @author Simon Zimmermann
*/
package uia.alumni.web;
public enum newConstants {
PERSON("person"),
SEARCH("search"),
PERSISTENCE_UNIT("Alumni"),
USER("user"),
PASSWORD("password"),
USERNAME("username");
private String constant;
newConstants(String constant){
this.constant= constant;
}
@Override
public String toString(){
return constant;
}
}
|