Class Lookup.Empty

java.lang.Object
org.praxislive.core.Lookup.Empty
All Implemented Interfaces:
Lookup
Enclosing interface:
Lookup

public static class Lookup.Empty extends Object implements Lookup
  • Constructor Details

    • Empty

      public Empty()
  • Method Details

    • find

      public <T> Optional<T> find(Class<T> type)
      Description copied from interface: Lookup
      Search for the first implementation of the given type. Returns an Optional wrapping an instance of the given Class, or Optional.EMPTY if none exists.
      Specified by:
      find in interface Lookup
      Type Parameters:
      T - service type to lookup
      Parameters:
      type - class of service to lookup
      Returns:
      Optional wrapping first instance of type, or an empty Optional if not found
    • findAll

      public <T> Stream<T> findAll(Class<T> type)
      Description copied from interface: Lookup
      Search for all implementations of the given type.
      Specified by:
      findAll in interface Lookup
      Type Parameters:
      T - service type to lookup
      Parameters:
      type - class of service to lookup
      Returns:
      Stream of all implementations of the given type