I am writing a method that is a little overpowered and I want to throw a warning to my user telling him to "better know what you're doing", just like the way @deprecated behaves. I can write this one the method name, but I wonder if there is a more elegant way of doing this.
public class Divison {
public Divison() {
}
private int up;
private int down;
public int eval() {
return ((int) up/down);
}
public void setVars(int up, int down) {
this.up = up;
if (up%down == 0) {
this.down = down;
} else {
throw new ArithmeticException("the values must be divisible");
}
}
public void betterKnowWhatYouDoingSetVars(int up, int down) {
this.up = up;
this.down = down;
}
}