public class CountingRuleKeyHasher<HASH> extends Object implements RuleKeyHasher<HASH>
RuleKeyHasher
that counts the number of values put in it.RuleKeyHasher.Container, RuleKeyHasher.Wrapper
Constructor and Description |
---|
CountingRuleKeyHasher(RuleKeyHasher<HASH> delegate) |
public CountingRuleKeyHasher(RuleKeyHasher<HASH> delegate)
public long getCount()
public CountingRuleKeyHasher<HASH> putKey(String key)
RuleKeyHasher
putKey
in interface RuleKeyHasher<HASH>
public CountingRuleKeyHasher<HASH> putKeyPath(Path key)
RuleKeyHasher
putKeyPath
in interface RuleKeyHasher<HASH>
public CountingRuleKeyHasher<HASH> putNull()
RuleKeyHasher
putNull
in interface RuleKeyHasher<HASH>
public CountingRuleKeyHasher<HASH> putCharacter(char val)
putCharacter
in interface RuleKeyHasher<HASH>
public CountingRuleKeyHasher<HASH> putBoolean(boolean val)
putBoolean
in interface RuleKeyHasher<HASH>
public CountingRuleKeyHasher<HASH> putNumber(Number val)
putNumber
in interface RuleKeyHasher<HASH>
public CountingRuleKeyHasher<HASH> putString(String val)
putString
in interface RuleKeyHasher<HASH>
public CountingRuleKeyHasher<HASH> putBytes(byte[] bytes)
putBytes
in interface RuleKeyHasher<HASH>
public CountingRuleKeyHasher<HASH> putPattern(Pattern pattern)
putPattern
in interface RuleKeyHasher<HASH>
public CountingRuleKeyHasher<HASH> putSha1(Sha1HashCode sha1)
RuleKeyHasher
putSha1
in interface RuleKeyHasher<HASH>
public CountingRuleKeyHasher<HASH> putPath(Path path, com.google.common.hash.HashCode hash)
putPath
in interface RuleKeyHasher<HASH>
public CountingRuleKeyHasher<HASH> putArchiveMemberPath(Path relativeArchivePath, Path archiveMemberPath, com.google.common.hash.HashCode hash)
putArchiveMemberPath
in interface RuleKeyHasher<HASH>
relativeArchivePath
- relative path to archive.archiveMemberPath
- path to archive member.public CountingRuleKeyHasher<HASH> putNonHashingPath(Path path)
putNonHashingPath
in interface RuleKeyHasher<HASH>
public CountingRuleKeyHasher<HASH> putRuleKey(RuleKey ruleKey)
putRuleKey
in interface RuleKeyHasher<HASH>
public CountingRuleKeyHasher<HASH> putRuleType(RuleType ruleType)
putRuleType
in interface RuleKeyHasher<HASH>
public CountingRuleKeyHasher<HASH> putBuildTarget(BuildTarget buildTarget)
putBuildTarget
in interface RuleKeyHasher<HASH>
public CountingRuleKeyHasher<HASH> putBuildTargetSourcePath(BuildTargetSourcePath buildTargetSourcePath)
putBuildTargetSourcePath
in interface RuleKeyHasher<HASH>
public CountingRuleKeyHasher<HASH> putContainer(RuleKeyHasher.Container container, int length)
RuleKeyHasher
putContainer
in interface RuleKeyHasher<HASH>
public CountingRuleKeyHasher<HASH> putWrapper(RuleKeyHasher.Wrapper wrapper)
putWrapper
in interface RuleKeyHasher<HASH>
public HASH hash()
RuleKeyHasher
hash
in interface RuleKeyHasher<HASH>