yo man,how about this one:
public class CheckItOut {
enum PinType {
CATEGORY {
@Override
String pin(String id, int max, int limit) {
return StringUtils.EMPTY;
}
},
BOARD {
@Override
String pin(String id, int max, int limit) {
return StringUtils.EMPTY;
}
},
USER_ID {
@Override
String pin(String id, int max, int limit) {
return StringUtils.EMPTY;
}
},
USER_NAME {
@Override
String pin(String id, int max, int limit) {
return StringUtils.EMPTY;
}
};
abstract String pin(String id,int max,int limit);
}
@Test
public void testThemOutYo(){
PinType.BOARD.pin("id001",Integer.MAX_VALUE,1000);
}
}
调用起来蛮好看。