EN · DE · RU · FR · ES

#1897: Matcher.java

projectforge-common/src/main/java/org/projectforge/common/mgc/Matcher.java Type: Java · Role: Component · Source: projectforge-common/src/main/java/org/projectforge/common/mgc/Matcher.java 71 lines · 10 code · 54 comments · 7 blank
Source code file at projectforge-common/src/main/java/org/projectforge/common/mgc/Matcher.java containing Java code for the Component layer.

Code Structure

Package: org.projectforge.common.mgc

Interfaces: Matcher

Extends: Serializable

Methods (2): match, apply

Imports: 2 packages

Source Code (abridged)

package org.projectforge.common.mgc;

import java.io.Serializable;
import java.util.Collection;

/**
 * Base class for matching.
 *
 * @author roger
 * @param <T> the generic type
 */
public interface Matcher<T>extends Serializable
{

  /**
   * Allgemeine Methode um ein Object auf das "Passen" zu überpüfen.
   *
   * @param object Das zu checkende Objekt
   * @return true, falls das Objekt passt
   */
  public boolean match(T object);

  /**
   * similar to match, but return 3 state.
   *
   * @param object the object
   * @return the match result
   */
  public MatchResult apply(T object);

  /**
   * Match any.
   *
   * @param sl the sl
   * @param defaultValue if none are matched, returns defualtValue
   * @return true, if successful
   */
  boolean matchAny(Collection<T> sl, boolean defaultValue);

  /**
   * Match all.
   *
   * @param sl the sl
   * @param defaultValue the default value
   * @return true, if successful
   */
  boolean matchAll(Collection<T> sl, boolean defaultValue);
}

Git History

868d6abb7 2025 -> 2026
63081666f Source file headers: 2024-> 2025.
067a4cbb1 Migration stuff in progress...
e33c8b9c2 Migration stuff in progress...