Package io.vavr

Class MatchError

  • All Implemented Interfaces:
    java.io.Serializable

    public class MatchError
    extends java.util.NoSuchElementException
    A API.Match throws a MatchError if no case matches the applied object.
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.lang.Object obj  
      private static long serialVersionUID  
    • Constructor Summary

      Constructors 
      Constructor Description
      MatchError​(java.lang.Object obj)
      Internally called by API.Match.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.Object getObject()
      Returns the object which could not be matched.
      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
      • Methods inherited from class java.lang.Object

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

      • obj

        private final java.lang.Object obj
    • Constructor Detail

      • MatchError

        MatchError​(java.lang.Object obj)
        Internally called by API.Match.
        Parameters:
        obj - The object which could not be matched.
    • Method Detail

      • getObject

        public java.lang.Object getObject()
        Returns the object which could not be matched.
        Returns:
        An Object.