aboutsummaryrefslogtreecommitdiff
path: root/guava/src/com/google/common/hash/PrimitiveSink.java
diff options
context:
space:
mode:
Diffstat (limited to 'guava/src/com/google/common/hash/PrimitiveSink.java')
-rw-r--r--guava/src/com/google/common/hash/PrimitiveSink.java14
1 files changed, 13 insertions, 1 deletions
diff --git a/guava/src/com/google/common/hash/PrimitiveSink.java b/guava/src/com/google/common/hash/PrimitiveSink.java
index a29ba4e13..ecd6a32c8 100644
--- a/guava/src/com/google/common/hash/PrimitiveSink.java
+++ b/guava/src/com/google/common/hash/PrimitiveSink.java
@@ -26,7 +26,6 @@ import java.nio.charset.Charset;
* @since 12.0 (in 11.0 as {@code Sink})
*/
@Beta
-@CanIgnoreReturnValue
@ElementTypesAreNonnullByDefault
public interface PrimitiveSink {
/**
@@ -35,6 +34,7 @@ public interface PrimitiveSink {
* @param b a byte
* @return this instance
*/
+ @CanIgnoreReturnValue
PrimitiveSink putByte(byte b);
/**
@@ -43,6 +43,7 @@ public interface PrimitiveSink {
* @param bytes a byte array
* @return this instance
*/
+ @CanIgnoreReturnValue
PrimitiveSink putBytes(byte[] bytes);
/**
@@ -56,6 +57,7 @@ public interface PrimitiveSink {
* @throws IndexOutOfBoundsException if {@code off < 0} or {@code off + len > bytes.length} or
* {@code len < 0}
*/
+ @CanIgnoreReturnValue
PrimitiveSink putBytes(byte[] bytes, int off, int len);
/**
@@ -67,27 +69,35 @@ public interface PrimitiveSink {
* @return this instance
* @since 23.0
*/
+ @CanIgnoreReturnValue
PrimitiveSink putBytes(ByteBuffer bytes);
/** Puts a short into this sink. */
+ @CanIgnoreReturnValue
PrimitiveSink putShort(short s);
/** Puts an int into this sink. */
+ @CanIgnoreReturnValue
PrimitiveSink putInt(int i);
/** Puts a long into this sink. */
+ @CanIgnoreReturnValue
PrimitiveSink putLong(long l);
/** Puts a float into this sink. */
+ @CanIgnoreReturnValue
PrimitiveSink putFloat(float f);
/** Puts a double into this sink. */
+ @CanIgnoreReturnValue
PrimitiveSink putDouble(double d);
/** Puts a boolean into this sink. */
+ @CanIgnoreReturnValue
PrimitiveSink putBoolean(boolean b);
/** Puts a character into this sink. */
+ @CanIgnoreReturnValue
PrimitiveSink putChar(char c);
/**
@@ -99,6 +109,7 @@ public interface PrimitiveSink {
*
* @since 15.0 (since 11.0 as putString(CharSequence))
*/
+ @CanIgnoreReturnValue
PrimitiveSink putUnencodedChars(CharSequence charSequence);
/**
@@ -109,5 +120,6 @@ public interface PrimitiveSink {
* is faster, produces the same output across Java releases, and processes every {@code char} in
* the input, even if some are invalid.
*/
+ @CanIgnoreReturnValue
PrimitiveSink putString(CharSequence charSequence, Charset charset);
}