aboutsummaryrefslogtreecommitdiffstats
path: root/guava/src/com/google/common/hash/AbstractStreamingHashFunction.java
diff options
context:
space:
mode:
Diffstat (limited to 'guava/src/com/google/common/hash/AbstractStreamingHashFunction.java')
-rw-r--r--guava/src/com/google/common/hash/AbstractStreamingHashFunction.java14
1 files changed, 3 insertions, 11 deletions
diff --git a/guava/src/com/google/common/hash/AbstractStreamingHashFunction.java b/guava/src/com/google/common/hash/AbstractStreamingHashFunction.java
index ea6f692..de7748f 100644
--- a/guava/src/com/google/common/hash/AbstractStreamingHashFunction.java
+++ b/guava/src/com/google/common/hash/AbstractStreamingHashFunction.java
@@ -33,10 +33,6 @@ import java.nio.charset.Charset;
* @author Kevin Bourrillion
*/
abstract class AbstractStreamingHashFunction implements HashFunction {
- @Override public <T> HashCode hashObject(T instance, Funnel<? super T> funnel) {
- return newHasher().putObject(instance, funnel).hash();
- }
-
@Override public HashCode hashString(CharSequence input) {
return newHasher().putString(input).hash();
}
@@ -45,10 +41,6 @@ abstract class AbstractStreamingHashFunction implements HashFunction {
return newHasher().putString(input, charset).hash();
}
- @Override public HashCode hashInt(int input) {
- return newHasher().putInt(input).hash();
- }
-
@Override public HashCode hashLong(long input) {
return newHasher().putLong(input).hash();
}
@@ -70,8 +62,8 @@ abstract class AbstractStreamingHashFunction implements HashFunction {
* A convenience base class for implementors of {@code Hasher}; handles accumulating data
* until an entire "chunk" (of implementation-dependent length) is ready to be hashed.
*
- * @author Kevin Bourrillion
- * @author Dimitris Andreou
+ * @author kevinb@google.com (Kevin Bourrillion)
+ * @author andreou@google.com (Dimitris Andreou)
*/
// TODO(kevinb): this class still needs some design-and-document-for-inheritance love
protected static abstract class AbstractStreamingHasher extends AbstractHasher {
@@ -150,7 +142,7 @@ abstract class AbstractStreamingHashFunction implements HashFunction {
return putBytes(ByteBuffer.wrap(bytes, off, len).order(ByteOrder.LITTLE_ENDIAN));
}
- private Hasher putBytes(ByteBuffer readBuffer) {
+ private final Hasher putBytes(ByteBuffer readBuffer) {
// If we have room for all of it, this is easy
if (readBuffer.remaining() <= buffer.remaining()) {
buffer.put(readBuffer);