Interface ModuleDescription.ForLoadedModule.Optional

Enclosing class:
ModuleDescription.ForLoadedModule

@Proxied("java.util.Optional") protected static interface ModuleDescription.ForLoadedModule.Optional
A proxy for interacting with java.util.Optional.
  • Method Summary

    Modifier and Type
    Method
    Description
    orElse(Object value, Object fallback)
    Returns the value if present, otherwise returns the fallback value.
  • Method Details

    • orElse

      @MaybeNull Object orElse(Object value, @MaybeNull Object fallback)
      Returns the value if present, otherwise returns the fallback value.
      Parameters:
      value - The java.util.Optional instance.
      fallback - The fallback value to return if the optional is empty.
      Returns:
      The value if present, otherwise the fallback value.