
net.sourceforge.plantuml.dedication.TinyHashableString Maven / Gradle / Ivy
// THIS FILE HAS BEEN GENERATED BY A PREPROCESSOR.
package net.sourceforge.plantuml.dedication;
import static java.nio.charset.StandardCharsets.UTF_8;
public final class TinyHashableString {
private final String sentence;
private int cachedTinyHash = -1;
public TinyHashableString(String sentence) {
this.sentence = sentence;
}
public String getSentence() {
return sentence;
}
public synchronized int tinyHash() {
if (cachedTinyHash == -1)
cachedTinyHash = Noise.shortHash(sentence.getBytes(UTF_8), Dedication.N.toByteArray());
return cachedTinyHash;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy