Emily-Jiang / microprofile.config.incubator

Apache License 2.0
0 stars 2 forks source link

Should the API support Java8 syntax and classes? #22

Open tevans78 opened 7 years ago

tevans78 commented 7 years ago

Java 8 allows for two things which might be useful; 1) static and default methods in interfaces 2) The new Optional classes are useful for config... they encapsulate the possibility of a null value and/or a default value. e.g.

public <T> Optional<T> getOptional(String key, Class<T> clazz);

public OptionalDouble getOptionalDouble(String key);
public OptionalInt getOptionalInt(String key);
public OptionalLong getOptionalLong(String key);
Emily-Jiang commented 7 years ago

will discuss on the mailing list of microprofile community