I'm writing a little functional Interface and the method that it contains, takes an int as parameter. I was wondering if there's any way to check that when this method will be called, the value passed to the method, will not exceed a certain value and if it does, throw an error. Is there maybe an annotation I can add?
This is what my interface looks like
public interface DrawCardHandler{
void onDrawCard(int slot);
}