Package io.vavr

Class API.Match.Case1<T,T1,R>

java.lang.Object
io.vavr.API.Match.Case1<T,T1,R>
Type Parameters:
T - Type of the value being matched
T1 - Intermediate type 1
R - Return value type
All Implemented Interfaces:
API.Match.Case<T,R>, Function1<T,R>, PartialFunction<T,R>, Serializable, Function<T,R>
Enclosing class:
API.Match<T>

public static final class API.Match.Case1<T,T1,R> extends Object implements API.Match.Case<T,R>
API.Match.Case implementation for a case with 1 intermediate type
See Also:
  • Method Details

    • 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 Function<T,T1>
      Specified by:
      apply in interface Function1<T,T1>
      Specified by:
      apply in interface PartialFunction<T,T1>
      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,T1>
      Parameters:
      obj - a potential input to the function
      Returns:
      true if the given value is contained in the function's domain, false otherwise