1b8cf1e5f607a5aaf09c904703a269ea7979781adcrazyboblee/**
2b8cf1e5f607a5aaf09c904703a269ea7979781adcrazyboblee * Copyright (C) 2006 Google Inc.
3b8cf1e5f607a5aaf09c904703a269ea7979781adcrazyboblee *
4b8cf1e5f607a5aaf09c904703a269ea7979781adcrazyboblee * Licensed under the Apache License, Version 2.0 (the "License");
5b8cf1e5f607a5aaf09c904703a269ea7979781adcrazyboblee * you may not use this file except in compliance with the License.
6b8cf1e5f607a5aaf09c904703a269ea7979781adcrazyboblee * You may obtain a copy of the License at
7b8cf1e5f607a5aaf09c904703a269ea7979781adcrazyboblee *
8b8cf1e5f607a5aaf09c904703a269ea7979781adcrazyboblee * http://www.apache.org/licenses/LICENSE-2.0
9b8cf1e5f607a5aaf09c904703a269ea7979781adcrazyboblee *
10b8cf1e5f607a5aaf09c904703a269ea7979781adcrazyboblee * Unless required by applicable law or agreed to in writing, software
11b8cf1e5f607a5aaf09c904703a269ea7979781adcrazyboblee * distributed under the License is distributed on an "AS IS" BASIS,
12b8cf1e5f607a5aaf09c904703a269ea7979781adcrazyboblee * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13b8cf1e5f607a5aaf09c904703a269ea7979781adcrazyboblee * See the License for the specific language governing permissions and
14b8cf1e5f607a5aaf09c904703a269ea7979781adcrazyboblee * limitations under the License.
15b8cf1e5f607a5aaf09c904703a269ea7979781adcrazyboblee */
162008ec7e532ae11c1b52f62b02a98e9f6ee00ac8crazyboblee
174f79e4007e8b08ccfb3a76ec0fb57ec413046304crazybobleepackage com.google.inject.matcher;
182008ec7e532ae11c1b52f62b02a98e9f6ee00ac8crazyboblee
192008ec7e532ae11c1b52f62b02a98e9f6ee00ac8crazyboblee/**
202008ec7e532ae11c1b52f62b02a98e9f6ee00ac8crazyboblee * Returns {@code true} or {@code false} for a given input.
212008ec7e532ae11c1b52f62b02a98e9f6ee00ac8crazyboblee *
222008ec7e532ae11c1b52f62b02a98e9f6ee00ac8crazyboblee * @author crazybob@google.com (Bob Lee)
232008ec7e532ae11c1b52f62b02a98e9f6ee00ac8crazyboblee */
2433ce069dc927d72483b25aa1c4265fdc9251fc32crazybobleepublic interface Matcher<T> {
252008ec7e532ae11c1b52f62b02a98e9f6ee00ac8crazyboblee
262008ec7e532ae11c1b52f62b02a98e9f6ee00ac8crazyboblee  /**
2733ce069dc927d72483b25aa1c4265fdc9251fc32crazyboblee   * Returns {@code true} if this matches {@code t}, {@code false} otherwise.
282008ec7e532ae11c1b52f62b02a98e9f6ee00ac8crazyboblee   */
292008ec7e532ae11c1b52f62b02a98e9f6ee00ac8crazyboblee  boolean matches(T t);
302008ec7e532ae11c1b52f62b02a98e9f6ee00ac8crazyboblee
312008ec7e532ae11c1b52f62b02a98e9f6ee00ac8crazyboblee  /**
3233ce069dc927d72483b25aa1c4265fdc9251fc32crazyboblee   * Returns a new matcher which returns {@code true} if both this and the
3333ce069dc927d72483b25aa1c4265fdc9251fc32crazyboblee   * given matcher return {@code true}.
342008ec7e532ae11c1b52f62b02a98e9f6ee00ac8crazyboblee   */
3533ce069dc927d72483b25aa1c4265fdc9251fc32crazyboblee  Matcher<T> and(Matcher<? super T> other);
362008ec7e532ae11c1b52f62b02a98e9f6ee00ac8crazyboblee
372008ec7e532ae11c1b52f62b02a98e9f6ee00ac8crazyboblee  /**
3833ce069dc927d72483b25aa1c4265fdc9251fc32crazyboblee   * Returns a new matcher which returns {@code true} if either this or the
3933ce069dc927d72483b25aa1c4265fdc9251fc32crazyboblee   * given matcher return {@code true}.
402008ec7e532ae11c1b52f62b02a98e9f6ee00ac8crazyboblee   */
4133ce069dc927d72483b25aa1c4265fdc9251fc32crazyboblee  Matcher<T> or(Matcher<? super T> other);
422008ec7e532ae11c1b52f62b02a98e9f6ee00ac8crazyboblee}
43