1 /*
2 * Copyright [2007] [University Corporation for Advanced Internet Development, Inc.]
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17 package org.opensaml.xml.security;
18
19 /**
20 * Interface for criteria which are capable of evaluating a target of a particular type.
21 *
22 * @param <T> the type of object which may be evaluated
23 */
24 public interface EvaluableCriteria<T> extends Criteria {
25
26 /**
27 * Evaluate the target.
28 *
29 * The result of evaluation is one of the following values:
30 * <ul>
31 * <li><code>Boolean.TRUE</code> if the target satisfies the criteria</li>
32 * <li><code>Boolean.FALSE</code> if the target does not satisfy criteria</li>
33 * <li><code>null</code> if the target can not be evaluated against the criteria</li>
34 * </ul>
35 *
36 * @param target the object to be evaluated
37 * @return the result of evaluation
38 */
39 public Boolean evaluate(T target);
40
41 }