Package io.vavr

Class API.Match.Case0<T,​R>

    • Field Detail

      • serialVersionUID

        private static final long serialVersionUID
        The serial version UID for serialization.
        See Also:
        Constant Field Values
      • f

        private final transient java.util.function.Function<? super T,​? extends R> f
    • Constructor Detail

      • Case0

        private Case0​(API.Match.Pattern0<T> pattern,
                      java.util.function.Function<? super T,​? extends R> f)
    • Method Detail

      • apply

        public R apply​(T obj)
        Description copied from interface: PartialFunction
        Applies this function to the given argument and returns the result.
        Specified by:
        apply in interface java.util.function.Function<T,​R>
        Specified by:
        apply in interface Function1<T,​R>
        Specified by:
        apply in interface PartialFunction<T,​R>
        Parameters:
        obj - the input argument
        Returns:
        the result of applying this function to the input
      • isDefinedAt

        public boolean isDefinedAt​(T obj)
        Description copied from interface: PartialFunction
        Tests whether a value is contained in the function's domain.
        Specified by:
        isDefinedAt in interface PartialFunction<T,​R>
        Parameters:
        obj - a potential input to the function
        Returns:
        true if the given value is contained in the function's domain, false otherwise