Package net.shibboleth.oidc.metadata
Class AbstractEvaluableMetadataCriterion<T>
java.lang.Object
net.shibboleth.oidc.metadata.AbstractEvaluableMetadataCriterion<T>
- Type Parameters:
T- The metadata type this criterion accepts.
public abstract class AbstractEvaluableMetadataCriterion<T>
extends Object
implements Predicate<T>, Criterion
Base class for all metadata criterion classes. If the correct object type this criterion accepts is not provided,
test(Object) returns (defaultResultOnWrongType).-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final booleanWhat should the default return type be if the wrong type is supplied.Object type. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractEvaluableMetadataCriterion(Class<T> claz, boolean defaultResult) Constructor. -
Method Summary
-
Field Details
-
objectType
Object type. -
defaultResultOnWrongType
private final boolean defaultResultOnWrongTypeWhat should the default return type be if the wrong type is supplied.
-
-
Constructor Details
-
AbstractEvaluableMetadataCriterion
Constructor.- Parameters:
claz- the class this criterion accepts.defaultResult- what should be returned if the criterion is not appropriate for the given type.
-
-
Method Details
-
getType
Get the object type this criterion accepts.- Returns:
- the object type.
-
test
-
doTest
Evaluates the predicate on the given argument. Concrete implementations should override this method.- Parameters:
metadata- the metadata.- Returns:
- true if the predicate is true, false otherwise.
-