Interface Findable<T>

Type Parameters:
T - object-type to try to find.
All Known Implementing Classes:
Found, NotFound

public interface Findable<T>
Parent class for an element that exists in one of two-states, either Found or NotFound.
Author:
Owen Feehan
  • Method Summary

    Modifier and Type
    Method
    Description
    getOrLog(String name, Logger logger)
    Gets an object or otherwise logs a message describing what went wrong.
  • Method Details

    • getOrLog

      Optional<T> getOrLog(String name, Logger logger)
      Gets an object or otherwise logs a message describing what went wrong.
      Parameters:
      name - the name of the object to find, as may appear in the log.
      logger - the logger.
      Returns:
      the object if found, otherwise Optional.empty().