return notification instanceof DOMEvent;
}
+ /**
+ * Get time instant from notification if available or default
+ * @param notification
+ * @param defaultValue
+ * @return DateAndTime
+ */
public static DateAndTime getTime(Notification notification, Instant defaultValue) {
Instant time;
if (hasTime(notification)) { // If notification class extends/implements the EventInstantAware
return DateAndTime.getDefaultInstance(ZonedDateTime.ofInstant(time, ZoneOffset.UTC).format(formatterOutput));
}
+ /**
+ * Get time instant from notification if available or actual time
+ * @param notification
+ * @return DateAndTime
+ */
+ public static DateAndTime getTime(Notification notification) {
+ return getTime(notification, Instant.now());
+ }
+
+ /**
+ * Get time instant from DOM notification if available or default
+ * @param DOM notification
+ * @param defaultValue
+ * @return DateAndTime
+ */
public static DateAndTime getTime(DOMNotification notification, Instant defaultValue) {
Instant time;
if (hasTime(notification)) { // If notification class extends/implements the EventInstantAware
}
return DateAndTime.getDefaultInstance(ZonedDateTime.ofInstant(time, ZoneOffset.UTC).format(formatterOutput));
}
+
+ /**
+ * Get time instant from notification if available or actual time
+ * @param DOM notification
+ * @return DateAndTime
+ */
+ public static DateAndTime getTime(DOMNotification notification) {
+ return getTime(notification, Instant.now());
+ }
}