All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.tonivade.purefun.Matcher3 Maven / Gradle / Ivy

/*
 * Copyright (c) 2018-2019, Antonio Gabriel Muñoz Conejo 
 * Distributed under the terms of the MIT License
 */
package com.github.tonivade.purefun;

@FunctionalInterface
public interface Matcher3 {

  boolean match(A a, B b, C c);

  default Matcher1> tupled() {
    return tuple -> match(tuple.get1(), tuple.get2(), tuple.get3());
  }

  static  Matcher3 invalid() {
    return (a, b, c) -> { throw new IllegalStateException(); };
  }

  static  Matcher3 otherwise() {
    return (a, b, c) -> true;
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy