ambry
ambry copied to clipboard
VerifiableProperties needs more APIs
VerifiableProperties needs a few more APIs to support the use cases that have cropped.
- a "get if positive, otherwise throw" function for all types
- also provide separate functions for min and max bounds (for ranges)
@vgkholla Would it make more sense to implement the getter methods to return Java's Optional? This way the caller could choose if they want to get the value or throw or get the value or do some other action.
@mbabauer That might be a good addition but if everyone has to write the code to do "some other action", that wouldn't serve the purpose either (we could provide a default static orElse() function in VerifiableProperties to cover most cases)