Package cs2030s.fp

Class Actually.Failure

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.lang.Exception e  
    • Constructor Summary

      Constructors 
      Constructor Description
      Failure​(java.lang.Exception e)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void act​(Action<? super java.lang.Object> action)
      The method to act on its content.
      boolean equals​(java.lang.Object obj)  
      <U> U except​(Constant<? extends U> c)  
      void finish​(Action<? super java.lang.Object> action)  
      <R> Actually<R> next​(Immutator<? extends Actually<? extends R>,​? super java.lang.Object> immutator)  
      java.lang.String toString()  
      <R> Actually<R> transform​(Immutator<? extends R,​? super java.lang.Object> immutator)
      The method to produce another container with immutated element.
      java.lang.Object unless​(java.lang.Object other)  
      java.lang.Object unwrap()  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • e

        private final java.lang.Exception e
    • Constructor Detail

      • Failure

        Failure​(java.lang.Exception e)
    • Method Detail

      • unwrap

        public java.lang.Object unwrap()
                                throws java.lang.Exception
        Specified by:
        unwrap in class Actually<java.lang.Object>
        Throws:
        java.lang.Exception
      • except

        public <U> U except​(Constant<? extends U> c)
        Specified by:
        except in class Actually<java.lang.Object>
      • unless

        public java.lang.Object unless​(java.lang.Object other)
        Specified by:
        unless in class Actually<java.lang.Object>
      • finish

        public void finish​(Action<? super java.lang.Object> action)
        Specified by:
        finish in class Actually<java.lang.Object>
      • transform

        public <R> Actually<R> transform​(Immutator<? extends R,​? super java.lang.Object> immutator)
        Description copied from interface: Immutatorable
        The method to produce another container with immutated element.
        Type Parameters:
        R - the return type
        Parameters:
        immutator - The immutator.
        Returns:
        A new container containing the immutated element.
      • act

        public void act​(Action<? super java.lang.Object> action)
        Description copied from interface: Actionable
        The method to act on its content.
        Parameters:
        action - The action.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object