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
Fields Modifier and Type Field Description private booleandefaultResultOnWrongTypeWhat should the default return type be if the wrong type is supplied.private Class<T>objectTypeObject type.
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractEvaluableMetadataCriterion(Class<T> claz, boolean defaultResult)Constructor.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract booleandoTest(T metadata)Evaluates the predicate on the given argument.Class<T>getType()Get the object type this criterion accepts.booleantest(T t)
-
-
-
Method Detail
-
getType
@Nonnull public Class<T> getType()
Get the object type this criterion accepts.- Returns:
- the object type.
-
doTest
public abstract boolean doTest(T metadata)
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.
-
-