Should I check the validity of parameters passed to each method ?
By example, when a method take only a number between 0 and 100 in parameter, should I check that the value is correct?
I have dozens of classes, each with dozens of methods. For a simple getter, I can have more than half lines code only used for checking parameters. Add checks makes my code less maintainable, more heavy.
Seeing that it's a library, destined to be used by many other programmers, checking parameters can avoid many mistakes and bugs, and would be a appreciated.