Class API.Match.Pattern0<T>

java.lang.Object
io.vavr.API.Match.Pattern0<T>
Type Parameters:
T - Class type that is matched by this pattern
All Implemented Interfaces:
API.Match.Pattern<T,T>, Function1<T,T>, PartialFunction<T,T>, Serializable, Function<T,T>
Enclosing class:
API.Match<T>

public abstract static class API.Match.Pattern0<T> extends Object implements API.Match.Pattern<T,T>
A API.Match.Pattern implementation for the simplest pattern
See Also:
  • Field Details

  • Constructor Details

    • Pattern0

      protected Pattern0()
      Creates a new Pattern0.

      This constructor is protected because Pattern0 is abstract and intended to be subclassed rather than instantiated directly.

  • Method Details

    • any

      public static <T> API.Match.Pattern0<T> any()
      The greediest match, a catch-all
      Type Parameters:
      T - Class type that is matched by this pattern
      Returns:
      Pattern0
    • of

      public static <T> API.Match.Pattern0<T> of(@NonNull Class<? super T> type)
      Static factory for a API.Match.Pattern0 based on a Class
      Type Parameters:
      T - Class type matched by this pattern
      Parameters:
      type - Class to build the pattern from
      Returns:
      new Pattern0