Class DefaultScoreResolver
- java.lang.Object
-
- uk.gov.gchq.gaffer.store.operation.resolver.DefaultScoreResolver
-
- All Implemented Interfaces:
ScoreResolver<Operation>
public class DefaultScoreResolver extends Object implements ScoreResolver<Operation>
ADefaultScoreResolver
is the defaultScoreResolver
that returns the score based on a map of operation scores.
-
-
Field Summary
Fields Modifier and Type Field Description static int
DEFAULT_OPERATION_SCORE
-
Constructor Summary
Constructors Constructor Description DefaultScoreResolver()
DefaultScoreResolver(Map<Class<? extends Operation>,Integer> opScores)
DefaultScoreResolver(Map<Class<? extends Operation>,Integer> opScores, Map<Class<? extends Operation>,ScoreResolver> scoreResolvers)
DefaultScoreResolver(Map<Class<? extends Operation>,Integer> opScores, Map<Class<? extends Operation>,ScoreResolver> scoreResolvers, Operation skipResolvingOperation)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Integer
getScore(Operation operation)
Should return a (nullable) score for a given operation.-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface uk.gov.gchq.gaffer.store.operation.resolver.ScoreResolver
getScore
-
-
-
-
Field Detail
-
DEFAULT_OPERATION_SCORE
public static final int DEFAULT_OPERATION_SCORE
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
DefaultScoreResolver
public DefaultScoreResolver()
-
DefaultScoreResolver
public DefaultScoreResolver(Map<Class<? extends Operation>,Integer> opScores)
-
DefaultScoreResolver
public DefaultScoreResolver(Map<Class<? extends Operation>,Integer> opScores, Map<Class<? extends Operation>,ScoreResolver> scoreResolvers)
-
-
Method Detail
-
getScore
public Integer getScore(Operation operation)
Description copied from interface:ScoreResolver
Should return a (nullable) score for a given operation.- Specified by:
getScore
in interfaceScoreResolver<Operation>
- Parameters:
operation
- the provided operation for which the score should be resolved- Returns:
- the score for the operation, otherwise null if not found
-
-