maven-example/src/main/java/com/ticketmaster/api/example/AsciiArtTableExample.java
private static String getEventDate(Date dates) {
    return Optional.ofNullable(dates).map(Date::getStart).map(Start::getDateTime)
        .map(dt -> dt.toString()).orElse("No date");
  }
private static String getEventDate(Date dates) {
    return Optional.ofNullable(dates).map(Date::getStart).map(Start::getDateTime)
        .map(dt -> dt.toString()).orElse("No date");
  }
private static String getEventDate ( Date dates ) { return Optional . ofNullable ( dates ) . map ( Date :: getStart ) . map ( Start :: getDateTime ) . map ( dt -> dt . toString ( ) ) . orElse ( "No date" ) ; }
Note: The following methods are used to get a String representation of the different POJO
(while handling null value)
Note : The following methods are used to get a String representation of the different POJO ( while handling null value )