Class ResourceSelectionResult<R>

  • Type Parameters:
    R - The resource type this selection result is for

    public class ResourceSelectionResult<R>
    extends java.lang.Object
    A data class for returning the results of an attempted resource selection.
    Since:
    4.0.0
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.Optional<R> getSelectedResource()
      Get the selected resource if there was one.
      java.util.Optional<java.lang.String> getSelectionRationale()
      Return any rationale as to why this resource was selected or why no resource was selected if that was the case.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • getSelectedResource

        public java.util.Optional<R> getSelectedResource()
        Get the selected resource if there was one.
        Returns:
        The selected resource wrapped in Optional else Optional.empty()
      • getSelectionRationale

        public java.util.Optional<java.lang.String> getSelectionRationale()
        Return any rationale as to why this resource was selected or why no resource was selected if that was the case.
        Returns:
        Any provided rationale or Optional.empty()