Package com.google.common.primitives
@ParametersAreNonnullByDefault
package com.google.common.primitives
Static utilities for the eight primitive types and
void
, and value types for treating
them as unsigned or storing them in immutable arrays.
This package is a part of the open-source Guava library.
See the Guava User Guide article on primitive utilities.
Contents
Value types
ImmutableDoubleArray
ImmutableIntArray
-
invalid reference
ImmutableLongrray
UnsignedInteger
UnsignedLong
Per-type static utilities
General static utilities
-
ClassDescriptionComparators for
Boolean
values.Holder for web specializations of methods ofDoubles
.Marks all "top-level" types as non-null in a way that is recognized by Kotlin.Holder for web specializations of methods ofFloats
.An immutable array ofdouble
values, with an API resemblingList
.A builder forImmutableDoubleArray
instances; obtained usingImmutableDoubleArray.builder(int)
.An immutable array ofint
values, with an API resemblingList
.A builder forImmutableIntArray
instances; obtained usingImmutableIntArray.builder(int)
.An immutable array oflong
values, with an API resemblingList
.A builder forImmutableLongArray
instances; obtained usingImmutableLongArray.builder(int)
.Holder for web specializations of methods ofInts
.Annotates a "top-level" type-variable usage that takes its nullness from the type argument supplied by the user of the class.A string to be parsed as a number and the radix to interpret it in.Contains static utility methods pertaining to primitive types and their corresponding wrapper types.Holder for web specializations of methods ofShorts
.Static utility methods pertaining tobyte
primitives that interpret values as signed.Static utility methods pertaining tobyte
primitives that interpret values as unsigned (that is, any negative valueb
is treated as the positive value256 + b
).Provides a lexicographical comparator implementation; either a Java implementation or a faster implementation based onUnsafe
.A wrapper class for unsignedint
values, supporting arithmetic operations.Static utility methods pertaining toint
primitives that interpret values as unsigned (that is, any negative valuex
is treated as the positive value2^32 + x
).A wrapper class for unsignedlong
values, supporting arithmetic operations.Static utility methods pertaining tolong
primitives that interpret values as unsigned (that is, any negative valuex
is treated as the positive value2^64 + x
).