@Test public void hash_value_null() { assertEquals("", hasher.hash(null)); }
public String hash(String value) { if (StringUtils.isBlank(value)) return ""; value = value.trim(); String[] parts = value.split("\\s+"); int realNumberOfParts = this.numberOfParts; if (parts.length < this.numberOfParts) { realNumberOfParts = parts.length; } return generateHash(realNumberOfParts, this.numberOfLettersPerPart, parts); }
StringPartFirstLettersHasher implements BucketHasher<String> { public String hash(String value) { if (StringUtils.isBlank(value)) return ""; value = value.trim(); String[] parts = value.split("\\s+"); int realNumberOfParts = this.numberOfParts; if (parts.length < this.numberOfParts) { realNumberOfParts = parts.length; } return generateHash(realNumberOfParts, this.numberOfLettersPerPart, parts); } }
StringPartFirstLettersHasher implements BucketHasher<String> { public String hash(String value) { if (StringUtils.isBlank(value)) return ""; value = value.trim(); String[] parts = value.split("\\s+"); int realNumberOfParts = this.numberOfParts; if (parts.length < this.numberOfParts) { realNumberOfParts = parts.length; } return generateHash(realNumberOfParts, this.numberOfLettersPerPart, parts); }  }
StringPartFirstLettersHasher implements BucketHasher<String> { public String hash(String value) { if (StringUtils.isBlank(value)) return ""; value = value.trim(); String[] parts = value.split("\\s+"); int realNumberOfParts = this.numberOfParts; if (parts.length < this.numberOfParts) { realNumberOfParts = parts.length; } return generateHash(realNumberOfParts, this.numberOfLettersPerPart, parts); }  String hash(String value); void setNumberOfParts(int numberOfParts); void setNumberOfLettersPerPart(int numberOfLettersPerPart); }
StringPartFirstLettersHasher implements BucketHasher<String> { public String hash(String value) { if (StringUtils.isBlank(value)) return ""; value = value.trim(); String[] parts = value.split("\\s+"); int realNumberOfParts = this.numberOfParts; if (parts.length < this.numberOfParts) { realNumberOfParts = parts.length; } return generateHash(realNumberOfParts, this.numberOfLettersPerPart, parts); }  String hash(String value); void setNumberOfParts(int numberOfParts); void setNumberOfLettersPerPart(int numberOfLettersPerPart);  }