public class DefaultRuleKeyScopedHasher<HASH> extends Object implements RuleKeyScopedHasher
RuleKeyHasher that provides scoped hashing facilities.
Important: Container, wrapper and key signatures only get hashed if their scope was non-empty. I.e. if at least one thing gets hashed under their scope. This is to support rule key builders that ignore some fields.
| Modifier and Type | Class and Description |
|---|---|
static class |
DefaultRuleKeyScopedHasher.DefaultContainerScope |
RuleKeyScopedHasher.ContainerScope| Modifier and Type | Method and Description |
|---|---|
RuleKeyScopedHasher.ContainerScope |
containerScope(RuleKeyHasher.Container container)
Hashes the container iff non-empty (i.e.
|
CountingRuleKeyHasher<HASH> |
getHasher() |
Scope |
keyScope(String key)
Hashes the key iff non-empty (i.e.
|
Scope |
pathKeyScope(Path key)
Hashes the key iff non-empty (i.e.
|
Scope |
wrapperScope(RuleKeyHasher.Wrapper wrapper)
Hashes the wrapper iff non-empty (i.e.
|
public CountingRuleKeyHasher<HASH> getHasher()
public Scope keyScope(String key)
keyScope in interface RuleKeyScopedHasherpublic Scope pathKeyScope(Path key)
pathKeyScope in interface RuleKeyScopedHasherpublic Scope wrapperScope(RuleKeyHasher.Wrapper wrapper)
wrapperScope in interface RuleKeyScopedHasherpublic RuleKeyScopedHasher.ContainerScope containerScope(RuleKeyHasher.Container container)
Note that an element scope needs to be created for each element!
containerScope in interface RuleKeyScopedHasher