default boolean ifBoolean(Consumer<Boolean> consumer){
  if (isBoolean()) {
    consumer.accept(asBoolean());
    return true;
  }
  return false;
}

default boolean ifBoolean ( Consumer < Boolean > consumer ) { if ( isBoolean ( ) ) { consumer . accept ( asBoolean ( ) ) ; return true ; } return false ; }
if a value is a boolean value , invoke the specified consumer with the value , otherwise do nothing .
