java - What is corresponding method to StringUtils.defaultIfEmpty() but for LocalDate? -


private clientidentifier(final client client, final codevalue documenttype,                           final string documentkey, final localdate validity,                           final string description) {     this.client = client;     this.documenttype = documenttype;     this.documentkey = stringutils.defaultifempty(documentkey, null);     this.validity = localeutils.defaultifempty(validity,null); // confused in part     this.description = stringutils.defaultifempty(description, null); } 

i passing localdate don't know utility use checking defualtifempty

to provide default values type, can use e.g. objectutils.firstnonnull(t...) apache commons or moreobjects.firstnonnull(t,t) guava.


Comments

Popular posts from this blog

python - Installing PyDev in eclipse is failed -

PHP OOP-based login system -

c# - Nested Internal Class with Readonly Hashtable throws Null ref exception.. on assignment -