Class Optionally.Hard<T>

java.lang.Object
org.eclipse.jgit.internal.util.Optionally.Hard<T>
Type Parameters:
T - type of the mutable optional object
All Implemented Interfaces:
Optionally<T>
Enclosing interface:
Optionally<T>

public static class Optionally.Hard<T> extends Object implements Optionally<T>
A permanent(hard) reference to an object
  • Field Details

    • element

      protected T element
      The mutable optional object
  • Constructor Details

    • Hard

      public Hard(T element)
      Parameters:
      element - the mutable optional object
  • Method Details

    • clear

      public void clear()
      Description copied from interface: Optionally
      Clear the object
      Specified by:
      clear in interface Optionally<T>
    • getOptional

      public Optional<T> getOptional()
      Description copied from interface: Optionally
      Get an Optional representing the current state of the object
      Specified by:
      getOptional in interface Optionally<T>
      Returns:
      the mutable optional object