You have to document the supported values for a parameter? What’s stopping someone from passing in 42? Or Integer.MIN_VALUE?
Where I rant against code comments
Corneliu Dascalu
739

What about using annotations?

e.g.

@IntRange(from=0,to=255)
Like what you read? Give Hector de Isidro a round of applause.

From a quick cheer to a standing ovation, clap to show how much you enjoyed this story.