/** * Returns <jk>true</jk> if the specified annotation contains all default values. * * @param a The annotation to check. * @return <jk>true</jk> if the specified annotation contains all default values. */ public static boolean empty(Contact a) { if (a == null) return true; return allEmpty(a.value()) && allEmpty(a.name(), a.url(), a.email()); }
/** * Returns <jk>true</jk> if the specified annotation contains all default values. * * @param a The annotation to check. * @return <jk>true</jk> if the specified annotation contains all default values. */ public static boolean empty(Contact a) { if (a == null) return true; return allEmpty(a.value()) && allEmpty(a.name(), a.url(), a.email()); }
/** * Returns <jk>true</jk> if the specified annotation contains all default values. * * @param a The annotation to check. * @return <jk>true</jk> if the specified annotation contains all default values. */ public static boolean empty(Contact a) { if (a == null) return true; return allEmpty(a.value()) && allEmpty(a.name(), a.url(), a.email()); }
private ObjectMap toMap(Contact a, String location, Object...locationArgs) throws ParseException { if (empty(a)) return null; ObjectMap om = newMap(new ObjectMap(), a.value(), location, locationArgs); om.appendSkipEmpty("name", resolve(a.name())); om.appendSkipEmpty("url", resolve(a.url())); om.appendSkipEmpty("email", resolve(a.email())); return nullIfEmpty(om); }
private ObjectMap toMap(Contact a, String location, Object...locationArgs) throws ParseException { if (empty(a)) return null; ObjectMap om = newMap(new ObjectMap(), a.value(), location, locationArgs); om.appendSkipEmpty("name", resolve(a.name())); om.appendSkipEmpty("url", resolve(a.url())); om.appendSkipEmpty("email", resolve(a.email())); return nullIfEmpty(om); }
private ObjectMap toMap(Contact a, String location, Object...locationArgs) throws ParseException { if (empty(a)) return null; ObjectMap om = newMap(new ObjectMap(), a.value(), location, locationArgs); om.appendSkipEmpty("name", resolve(a.name())); om.appendSkipEmpty("url", resolve(a.url())); om.appendSkipEmpty("email", resolve(a.email())); return nullIfEmpty(om); }