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

jquery - How do you format the date used in the popover widget title of FullCalendar? -

asp.net mvc - SSO between MVCForum and Umbraco7 -

Python Tkinter keyboard using bind -