Interface SafelyWrapped<T>

All Superinterfaces:
Wrapped<T>
All Known Implementing Classes:
Metadata, None, Option, Some

public interface SafelyWrapped<T> extends Wrapped<T>
SafelyWrapped interface.
Author:
Andrea Coronese
  • Method Summary

    Modifier and Type
    Method
    Description
    default Result<T,? extends Throwable>
    The non-throwing variant of Wrapped.unwrap().

    Methods inherited from interface org.storynode.pigeon.protocol.Wrapped

    unwrap
  • Method Details

    • tryUnwrap

      default Result<T,? extends Throwable> tryUnwrap()
      The non-throwing variant of Wrapped.unwrap(). This is guaranteed to never throw and to always return a non-null value.
      Returns:
      An Option containing the value, or empty if there is none or if an error would be raised while unwrapping said value.