AuthMe / ConfigMe

A simple configuration management library for any Java project!
MIT License
37 stars 14 forks source link

Optional (int) property by value #331

Open ljacqu opened 1 year ago

ljacqu commented 1 year ago

I've come across a lot of configurations that have optional limits that can be disabled by 0 or -1. This could be represented as a Property<Optional<Integer>> so that the application doesn't need to deal with checking if the property is "disabled".

Would be nice for double, too. Probably not for other types? Esp. considering that for String, the default would just be an empty string. But maybe this can be implemented similar to the existing optional property—it just wraps another property.