What is the right way in java to limit constructor values?
I want to make sure that its NOT possible to create objects using MyConstructor with the parameter int value > 5
example: (pseudo code)
public MyConstructor(value){
if(value < 5){
this.value = value;
}
}