Class Optionally.Soft<T>

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

public static class Optionally.Soft<T> extends SoftReference<T> implements Optionally<T>
A SoftReference Optionally
  • Constructor Details

    • Soft

      public Soft(T t)
      Parameters:
      t - the mutable optional object
  • Method Details

    • 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