@ParametersAreNonnullByDefault
Package com.google.common.primitives
Static utilities for working with the eight primitive types and
void
, and value types for
treating them as unsigned.
This package is a part of the open-source Guava library.
See the Guava User Guide article on primitive utilities.
Contents
General static utilities
Per-type static utilities
Value types
-
Class Summary Class Description Booleans Static utility methods pertaining toboolean
primitives, that are not already found in eitherBoolean
orArrays
.Booleans.BooleanArrayAsList Bytes Static utility methods pertaining tobyte
primitives, that are not already found in eitherByte
orArrays
, and interpret bytes as neither signed nor unsigned.Bytes.ByteArrayAsList Chars Static utility methods pertaining tochar
primitives, that are not already found in eitherCharacter
orArrays
.Chars.CharArrayAsList Doubles Static utility methods pertaining todouble
primitives, that are not already found in eitherDouble
orArrays
.Doubles.DoubleArrayAsList Doubles.DoubleConverter Floats Static utility methods pertaining tofloat
primitives, that are not already found in eitherFloat
orArrays
.Floats.FloatArrayAsList Floats.FloatConverter ImmutableDoubleArray An immutable array ofdouble
values, with an API resemblingList
.ImmutableDoubleArray.AsList ImmutableDoubleArray.Builder A builder forImmutableDoubleArray
instances; obtained usingImmutableDoubleArray.builder(int)
.ImmutableIntArray An immutable array ofint
values, with an API resemblingList
.ImmutableIntArray.AsList ImmutableIntArray.Builder A builder forImmutableIntArray
instances; obtained usingImmutableIntArray.builder(int)
.ImmutableLongArray An immutable array oflong
values, with an API resemblingList
.ImmutableLongArray.AsList ImmutableLongArray.Builder A builder forImmutableLongArray
instances; obtained usingImmutableLongArray.builder(int)
.Ints Static utility methods pertaining toint
primitives, that are not already found in eitherInteger
orArrays
.Ints.IntArrayAsList Ints.IntConverter Longs Static utility methods pertaining tolong
primitives, that are not already found in eitherLong
orArrays
.Longs.AsciiDigits Longs.LongArrayAsList Longs.LongConverter ParseRequest A string to be parsed as a number and the radix to interpret it in.Platform Methods factored out so that they can be emulated differently in GWT.Primitives Contains static utility methods pertaining to primitive types and their corresponding wrapper types.Shorts Static utility methods pertaining toshort
primitives, that are not already found in eitherShort
orArrays
.Shorts.ShortArrayAsList Shorts.ShortConverter SignedBytes Static utility methods pertaining tobyte
primitives that interpret values as signed.UnsignedBytes Static utility methods pertaining tobyte
primitives that interpret values as unsigned (that is, any negative valueb
is treated as the positive value256 + b
).UnsignedBytes.LexicographicalComparatorHolder Provides a lexicographical comparator implementation; either a Java implementation or a faster implementation based onUnsafe
.UnsignedInteger A wrapper class for unsignedint
values, supporting arithmetic operations.UnsignedInts Static utility methods pertaining toint
primitives that interpret values as unsigned (that is, any negative valuex
is treated as the positive value2^32 + x
).UnsignedLong A wrapper class for unsignedlong
values, supporting arithmetic operations.UnsignedLongs Static utility methods pertaining tolong
primitives that interpret values as unsigned (that is, any negative valuex
is treated as the positive value2^64 + x
).UnsignedLongs.ParseOverflowDetection