Paper icon indicating copy to clipboard operation
Paper copied to clipboard

Improvements checks for arguments numbers

Open Doc94 opened this issue 2 months ago • 3 comments

https://canary.discord.com/channels/289587909051416579/925530366192779286/1436805929810268160

Doc94 avatar Nov 08 '25 22:11 Doc94

maybe it'd be better to rename the class to something like Validations or ValuePreconditions? it could also be FloatPreconditions or smth but not sure if there aren't more types planned to be added to this...

Toffikk avatar Nov 08 '25 23:11 Toffikk

maybe it'd be better to rename the class to something like Validations or ValuePreconditions? it could also be FloatPreconditions or smth but not sure if there aren't more types planned to be added to this...

i think the idea is add more checks.. but i found another class with similar use.. then i move to this for now.

Doc94 avatar Nov 09 '25 02:11 Doc94

asArgument[Condition] -> require[Condition]

This follows the pattern of Objects.requireNonNull, etc.

only the asArgument methods not? also.... what about requireArgument (ex: requireArgumentMin, requireArgumentRange) for make clear its intended for Arguments.

Doc94 avatar Nov 11 '25 11:11 Doc94