/** * Validates the given contact information. * * @param object the object to validate, or {@code null}. * * @since 3.1 */ public void validate(final Contact object) { if (object == null) { return; } for (final Telephone e : toArray(Telephone.class, object.getPhones())) { validate(e); } for (final Address e : toArray(Address.class, object.getAddresses())) { validate(e); } for (final OnlineResource e : toArray(OnlineResource.class, object.getOnlineResources())) { validate(e); } for (final InternationalString e : toArray(InternationalString.class, object.getHoursOfService())) { container.validate(e); } validateOptional(object.getContactInstructions()); }