Uses of Annotation Type
com.google.common.annotations.Beta
Packages that use Beta
Package
Description
Basic utility libraries and interfaces.
This package contains generic collection interfaces and implementations, and other utilities for
working with collections.
An API for representing graph (node and edge) data.
Hash functions and related structures.
This package contains utility methods and classes for working with Java I/O; for example input
streams, output streams, readers, writers, and files.
Arithmetic functions operating on primitive values and
BigInteger instances.Static utilities for working with the eight primitive types and
void, and value types for
treating them as unsigned.This package contains utilities to work with Java reflection.
Concurrency utilities.
-
Uses of Beta in com.google.common.base
Classes in com.google.common.base with annotations of type BetaModifier and TypeClassDescriptionstatic final classAn object that splits strings into maps asSplittersplits iterables and lists.final classLow-level, high-performance utility methods related to the UTF-8 character encoding.Methods in com.google.common.base with annotations of type BetaModifier and TypeMethodDescription<A extends Appendable>
AAppends the string representation of each entry inentries, using the previously configured separator and key-value separator, toappendable.<A extends Appendable>
AAppends the string representation of each entry inentries, using the previously configured separator and key-value separator, toappendable.Joiner.MapJoiner.appendTo(StringBuilder builder, Iterable<? extends Map.Entry<?, ?>> entries) Appends the string representation of each entry inentries, using the previously configured separator and key-value separator, tobuilder.Joiner.MapJoiner.appendTo(StringBuilder builder, Iterator<? extends Map.Entry<?, ?>> entries) Appends the string representation of each entry inentries, using the previously configured separator and key-value separator, tobuilder.Returns a string containing the string representation of each entry inentries, using the previously configured separator and key-value separator.Returns a string containing the string representation of each entry inentries, using the previously configured separator and key-value separator.abstract TReturns the contained instance if it is present;supplier.get()otherwise.static <T> Iterable<T>Optional.presentInstances(Iterable<? extends Optional<? extends T>> optionals) Returns the value of each present instance from the suppliedoptionals, in order, skipping over occurrences ofOptional.absent().Splitter.splitToStream(CharSequence sequence) Splitssequenceinto string components and makes them available through anStream, which may be lazily evaluated.Returns a predicate that evaluates totrueif the class being tested is assignable to (is a subtype of)clazz.Splitter.withKeyValueSeparator(char separator) Returns aMapSplitterwhich splits entries based on this splitter, and splits entries into keys and values using the specified separator.Splitter.withKeyValueSeparator(Splitter keyValueSplitter) Returns aMapSplitterwhich splits entries based on this splitter, and splits entries into keys and values using the specified key-value splitter.Splitter.withKeyValueSeparator(String separator) Returns aMapSplitterwhich splits entries based on this splitter, and splits entries into keys and values using the specified separator. -
Uses of Beta in com.google.common.collect
Classes in com.google.common.collect with annotations of type BetaModifier and TypeClassDescriptionfinal classArrayTable<R,C, V> Fixed-sizeTableimplementation backed by a two-dimensional array.final classA non-blocking queue which automatically evicts elements from the head of the queue when attempting to add new elements onto the queue and it is full.protected classA sensible implementation ofMap.entrySet()in terms of the following methods:ForwardingMap.clear(),ForwardingMap.containsKey(java.lang.Object),ForwardingMap.get(java.lang.Object),ForwardingMap.isEmpty(),ForwardingMap.remove(java.lang.Object), andForwardingMap.size().protected classA sensible implementation ofMap.keySet()in terms of the following methods:ForwardingMap.clear(),ForwardingMap.containsKey(java.lang.Object),ForwardingMap.isEmpty(),ForwardingMap.remove(java.lang.Object),ForwardingMap.size(), and theSet.iterator()method ofForwardingMap.entrySet().protected classA sensible implementation ofMap.values()in terms of the following methods:ForwardingMap.clear(),ForwardingMap.containsValue(java.lang.Object),ForwardingMap.isEmpty(),ForwardingMap.size(), and theSet.iterator()method ofForwardingMap.entrySet().protected classA sensible implementation ofMultiset.elementSet()in terms of the following methods:ForwardingCollection.clear(),ForwardingCollection.contains(java.lang.Object),ForwardingCollection.containsAll(java.util.Collection<?>),ForwardingMultiset.count(java.lang.Object),ForwardingCollection.isEmpty(), theSet.size()andSet.iterator()methods ofForwardingMultiset.entrySet(), andForwardingMultiset.remove(Object, int).protected classA sensible implementation ofNavigableMap.descendingMap()in terms of the methods of thisNavigableMap.protected classA sensible implementation ofNavigableMap.navigableKeySet()in terms of the methods of thisNavigableMap.protected classA sensible implementation ofNavigableSet.descendingSet()in terms of the other methods ofNavigableSet, notably includingNavigableSet.descendingIterator().protected classA sensible implementation ofSortedMap.keySet()in terms of the methods ofForwardingSortedMap.classForwardingSortedMultiset<E extends @Nullable Object>A sorted multiset which forwards all its method calls to another sorted multiset.classImmutableRangeMap<K extends Comparable<?>,V> ARangeMapwhose contents will never change, with many other important properties detailed atImmutableCollection.final classImmutableRangeSet<C extends Comparable>ARangeSetwhose contents will never change, with many other important properties detailed atImmutableCollection.final classA double-ended priority queue, which provides constant-time access to both its least element and its greatest element, as determined by the queue's specified comparator.static final classThe builder class used in creation of min-max priority queues.interfaceRangeMap<K extends Comparable,V> A mapping from disjoint nonempty ranges to non-null values.interfaceRangeSet<C extends Comparable>final classTreeRangeMap<K extends Comparable,V> An implementation ofRangeMapbased on aTreeMap, supporting all optional operations.classTreeRangeSet<C extends Comparable<?>>classDeprecated.Methods in com.google.common.collect with annotations of type BetaModifier and TypeMethodDescriptionfinal FluentIterable<E>Returns a fluent iterable whose iterators traverse first the elements of this fluent iterable, followed byelements.final FluentIterable<E>Returns a fluent iterable whose iterators traverse first the elements of this fluent iterable, followed by those ofother.Multimaps.asMap(ListMultimap<K, V> multimap) static <K extends @Nullable Object,V extends @Nullable Object>
Map<K,Collection<V>> Returnsmultimap.asMap().Multimaps.asMap(SetMultimap<K, V> multimap) Multimaps.asMap(SortedSetMultimap<K, V> multimap) Returnsmultimap.asMap(), with its type corrected fromMap<K, Collection<V>>toMap<K, SortedSet<V>>.static <K,V> ImmutableBiMap.Builder<K, V> ImmutableBiMap.builderWithExpectedSize(int expectedSize) Returns a new builder, expecting the specified number of entries to be added.static <E> ImmutableList.Builder<E>ImmutableList.builderWithExpectedSize(int expectedSize) Returns a new builder, expecting the specified number of elements to be added.static <K,V> ImmutableMap.Builder<K, V> ImmutableMap.builderWithExpectedSize(int expectedSize) Returns a new builder, expecting the specified number of entries to be added.static <E> ImmutableSet.Builder<E>ImmutableSet.builderWithExpectedSize(int expectedSize) Returns a new builder, expecting the specified number of distinct elements to be added.Lists.charactersOf(CharSequence sequence) Returns a view of the specifiedCharSequenceas aList<Character>, viewingsequenceas a sequence of Unicode code units.static ContiguousSet<Integer>ContiguousSet.closed(int lower, int upper) Returns a nonempty contiguous set containing allintvalues fromlower(inclusive) toupper(inclusive).static ContiguousSet<Long>ContiguousSet.closed(long lower, long upper) Returns a nonempty contiguous set containing alllongvalues fromlower(inclusive) toupper(inclusive).static ContiguousSet<Integer>ContiguousSet.closedOpen(int lower, int upper) Returns a contiguous set containing allintvalues fromlower(inclusive) toupper(exclusive).static ContiguousSet<Long>ContiguousSet.closedOpen(long lower, long upper) Returns a contiguous set containing alllongvalues fromlower(inclusive) toupper(exclusive).Sets.combinations(Set<E> set, int size) Returns the set of all subsets ofsetof sizesize.static <T extends @Nullable Object>
FluentIterable<T>Returns a fluent iterable that combines several iterables.static <T extends @Nullable Object>
FluentIterable<T>Returns a fluent iterable that combines several iterables.static <T extends @Nullable Object>
FluentIterable<T>Returns a fluent iterable that combines two iterables.static <T extends @Nullable Object>
FluentIterable<T>Returns a fluent iterable that combines three iterables.static <T extends @Nullable Object>
FluentIterable<T>FluentIterable.concat(Iterable<? extends T> a, Iterable<? extends T> b, Iterable<? extends T> c, Iterable<? extends T> d) Returns a fluent iterable that combines four iterables.static <E> ImmutableMultiset<E>Multisets.copyHighestCountFirst(Multiset<E> multiset) Returns a copy ofmultisetas anImmutableMultisetwhose iteration order is highest count first, with ties broken by the iteration order of the original multiset.static <K,V> ImmutableBiMap<K, V> Returns an immutable bimap containing the given entries.static <K,V> ImmutableListMultimap<K, V> Returns an immutable multimap containing the specified entries.static <K,V> ImmutableMap<K, V> Returns an immutable map containing the specified entries.static <K,V> ImmutableMultimap<K, V> Returns an immutable multimap containing the specified entries.static <K,V> ImmutableSetMultimap<K, V> Returns an immutable multimap containing the specified entries.static <K,V> ImmutableSortedMap<K, V> Returns an immutable map containing the given entries, with keys sorted by their natural ordering.static <K,V> ImmutableSortedMap<K, V> ImmutableSortedMap.copyOf(Iterable<? extends Map.Entry<? extends K, ? extends V>> entries, Comparator<? super K> comparator) Returns an immutable map containing the given entries, with keys sorted by the provided comparator.static <E> ConcurrentHashMultiset<E>ConcurrentHashMultiset.create(ConcurrentMap<E, AtomicInteger> countMap) Creates a new, emptyConcurrentHashMultisetusingcountMapas the internal backing map.Multisets.difference(Multiset<E> multiset1, Multiset<?> multiset2) Returns an unmodifiable view of the difference of two multisets.static <E> intQueues.drain(BlockingQueue<E> q, Collection<? super E> buffer, int numElements, long timeout, TimeUnit unit) Drains the queue asBlockingQueue.drainTo(Collection, int), but if the requestednumElementselements are not available, it will wait for them up to the specified timeout.static <E> intQueues.drain(BlockingQueue<E> q, Collection<? super E> buffer, int numElements, Duration timeout) Drains the queue asBlockingQueue.drainTo(Collection, int), but if the requestednumElementselements are not available, it will wait for them up to the specified timeout.static <E> intQueues.drainUninterruptibly(BlockingQueue<E> q, Collection<? super E> buffer, int numElements, long timeout, TimeUnit unit) Drains the queue as Queues.drain(BlockingQueue, Collection, int, long, TimeUnit), but with a different behavior in case it is interrupted while waiting.static <E> intQueues.drainUninterruptibly(BlockingQueue<E> q, Collection<? super E> buffer, int numElements, Duration timeout) Drains the queue as Queues.drain(BlockingQueue, Collection, int, Duration), but with a different behavior in case it is interrupted while waiting.Returns a view of the elements ofunfilteredthat satisfy a predicate.static <T extends @Nullable Object,K extends @Nullable Object, V extends @Nullable Object, M extends Multimap<K, V>>
Collector<T,?, M> Multimaps.flatteningToMultimap(Function<? super T, ? extends K> keyFunction, Function<? super T, ? extends Stream<? extends V>> valueFunction, Supplier<M> multimapSupplier) Returns aCollectoraccumulating entries into aMultimapgenerated from the specified supplier.default voidMultiset.forEachEntry(ObjIntConsumer<? super E> action) Runs the specified action for each distinct element in this multiset, and the number of occurrences of that element.Streams.forEachPair(Stream<A> streamA, Stream<B> streamB, BiConsumer<? super A, ? super B> consumer) Invokesconsumeronce for each pair of corresponding elements instreamAandstreamB.static <E extends @Nullable Object>
FluentIterable<E>FluentIterable.from(E[] elements) Returns a fluent iterable containingelementsin the specified order.final StringReturns aStringcontaining all of the elements of this fluent iterable joined withjoiner.Iterables.mergeSorted(Iterable<? extends Iterable<? extends T>> iterables, Comparator<? super T> comparator) Returns an iterable over the merged contents of all giveniterables.static <T extends @Nullable Object>
UnmodifiableIterator<T>Iterators.mergeSorted(Iterable<? extends Iterator<? extends T>> iterators, Comparator<? super T> comparator) Returns an iterator over the merged contents of all giveniterators, traversing every element of the input iterators.static <R,C, V> Table<R, C, V> Tables.newCustomTable(Map<R, Map<C, V>> backingMap, Supplier<? extends Map<C, V>> factory) Creates a table that uses the specified backing map and factory.static <E extends @Nullable Object>
FluentIterable<E>FluentIterable.of()Returns a fluent iterable containing no elements.static <E extends @Nullable Object>
FluentIterable<E>FluentIterable.of(E element, E... elements) Returns a fluent iterable containing the specified elements in order.static <E extends Comparable<? super E>>
Collection<List<E>>Collections2.orderedPermutations(Iterable<E> elements) Returns aCollectionof all the permutations of the specifiedIterable.static <E> Collection<List<E>>Collections2.orderedPermutations(Iterable<E> elements, Comparator<? super E> comparator) Returns aCollectionof all the permutations of the specifiedIterableusing the specifiedComparatorfor establishing the lexicographical ordering.ImmutableBiMap.Builder.orderEntriesByValue(Comparator<? super V> valueComparator) Configures thisBuilderto order entries by value according to the specified comparator.ImmutableMap.Builder.orderEntriesByValue(Comparator<? super V> valueComparator) Configures thisBuilderto order entries by value according to the specified comparator.final ImmutableSortedMap.Builder<K,V> ImmutableSortedMap.Builder.orderEntriesByValue(Comparator<? super V> valueComparator) Deprecated.Unsupported by ImmutableSortedMap.Builder.static <E> Collection<List<E>>Collections2.permutations(Collection<E> elements) Returns aCollectionof all the permutations of the specifiedCollection.Adds all of the given entries to the built bimap.ImmutableListMultimap.Builder.putAll(Iterable<? extends Map.Entry<? extends K, ? extends V>> entries) Adds entries to the built multimap.Adds all of the given entries to the built map.Adds entries to the built multimap.Adds entries to the built multimap.Adds all the given entries to the built map.protected booleanForwardingMultiset.standardAddAll(Collection<? extends E> elementsToAdd) A sensible definition ofForwardingCollection.addAll(Collection)in terms ofForwardingCollection.add(Object)andForwardingMultiset.add(Object, int).protected booleanForwardingSortedSet.standardContains(Object object) A sensible definition ofForwardingCollection.contains(java.lang.Object)in terms of thefirst()method ofForwardingSortedSet.tailSet(E).protected booleanForwardingMap.standardContainsKey(Object key) A sensible, albeit inefficient, definition ofForwardingMap.containsKey(java.lang.Object)in terms of theiteratormethod ofForwardingMap.entrySet().protected booleanForwardingSortedMap.standardContainsKey(Object key) A sensible definition ofForwardingMap.containsKey(java.lang.Object)in terms of thefirstKey()method ofForwardingSortedMap.tailMap(K).protected intForwardingMultiset.standardCount(Object object) A sensible, albeit inefficient, definition ofForwardingMultiset.count(java.lang.Object)in terms ofForwardingMultiset.entrySet().protected NavigableSet<K>ForwardingNavigableMap.standardDescendingKeySet()A sensible definition ofForwardingNavigableMap.descendingKeySet()as thenavigableKeySetofForwardingNavigableMap.descendingMap().protected booleanForwardingList.standardEquals(Object object) A sensible definition ofForwardingList.equals(Object)in terms ofForwardingCollection.size()andForwardingCollection.iterator().protected intForwardingList.standardHashCode()A sensible definition ofForwardingList.hashCode()in terms ofForwardingCollection.iterator().protected ListIterator<E>ForwardingList.standardListIterator(int start) A sensible default implementation ofForwardingList.listIterator(int), in terms ofForwardingCollection.size(),ForwardingList.get(int),ForwardingList.set(int, Object),ForwardingList.add(int, Object), andForwardingList.remove(int).protected VForwardingMap.standardRemove(Object key) A sensible, albeit inefficient, definition ofForwardingMap.remove(java.lang.Object)in terms of theiteratormethod ofForwardingMap.entrySet().protected booleanForwardingSortedSet.standardRemove(Object object) A sensible definition ofForwardingCollection.remove(java.lang.Object)in terms of theiterator()method ofForwardingSortedSet.tailSet(E).ForwardingList.standardSubList(int fromIndex, int toIndex) A sensible default implementation ofForwardingList.subList(int, int).ForwardingSortedMap.standardSubMap(K fromKey, K toKey) A sensible default implementation ofForwardingSortedMap.subMap(Object, Object)in terms ofForwardingSortedMap.headMap(Object)andForwardingSortedMap.tailMap(Object).protected NavigableSet<E>ForwardingNavigableSet.standardSubSet(E fromElement, boolean fromInclusive, E toElement, boolean toInclusive) A sensible definition ofForwardingNavigableSet.subSet(Object, boolean, Object, boolean)in terms of theheadSetandtailSetmethods.ForwardingSortedSet.standardSubSet(E fromElement, E toElement) A sensible default implementation ofForwardingSortedSet.subSet(Object, Object)in terms ofForwardingSortedSet.headSet(Object)andForwardingSortedSet.tailSet(Object).protected StringForwardingMapEntry.standardToString()A sensible definition ofForwardingObject.toString()in terms ofForwardingMapEntry.getKey()andForwardingMapEntry.getValue().static <T> Stream<T>If a value is present inoptional, returns a stream containing only that element, otherwise returns an empty stream.Streams.stream(Collection<T> collection) Deprecated.There is no reason to use this; just invokecollection.stream()directly.Returns a sequentialStreamof the remaining contents ofiterator.static <T> Stream<T>If a value is present inoptional, returns a stream containing only that element, otherwise returns an empty stream.static DoubleStreamStreams.stream(OptionalDouble optional) If a value is present inoptional, returns a stream containing only that element, otherwise returns an empty stream.static IntStreamStreams.stream(OptionalInt optional) If a value is present inoptional, returns a stream containing only that element, otherwise returns an empty stream.static LongStreamStreams.stream(OptionalLong optional) If a value is present inoptional, returns a stream containing only that element, otherwise returns an empty stream.static <K extends Comparable<? super K>,V extends @Nullable Object>
NavigableMap<K,V> Maps.subMap(NavigableMap<K, V> map, Range<K> range) Returns a view of the portion ofmapwhose keys are contained byrange.static <K extends Comparable<? super K>>
NavigableSet<K>Sets.subSet(NavigableSet<K> set, Range<K> range) Returns a view of the portion ofsetwhose elements are contained byrange.Returns an unmodifiable view of the sum of two multisets.static <T extends @Nullable Object,R extends @Nullable Object, C extends @Nullable Object, V extends @Nullable Object, I extends Table<R, C, V>>
Collector<T,?, I> Tables.toTable(Function<? super T, ? extends R> rowFunction, Function<? super T, ? extends C> columnFunction, Function<? super T, ? extends V> valueFunction, Supplier<I> tableSupplier) Returns aCollectorthat accumulates elements into aTablecreated using the specified supplier, whose cells are generated by applying the provided mapping functions to the input elements.static <R extends @Nullable Object,C extends @Nullable Object, V1 extends @Nullable Object, V2 extends @Nullable Object>
Table<R,C, V2> Tables.transformValues(Table<R, C, V1> fromTable, Function<? super V1, V2> function) Returns a view of a table where each value is transformed by a function.Returns an unmodifiable view of the union of two multisets.static <R extends @Nullable Object,C extends @Nullable Object, V extends @Nullable Object>
RowSortedTable<R,C, V> Tables.unmodifiableRowSortedTable(RowSortedTable<R, ? extends C, ? extends V> table) Returns an unmodifiable view of the specified row-sorted table.static <E extends @Nullable Object>
SortedMultiset<E>Multisets.unmodifiableSortedMultiset(SortedMultiset<E> sortedMultiset) Returns an unmodifiable view of the specified sorted multiset.static <A extends @Nullable Object,B extends @Nullable Object, R extends @Nullable Object>
Stream<R>Streams.zip(Stream<A> streamA, Stream<B> streamB, BiFunction<? super A, ? super B, R> function) Returns a stream in which each element is the result of passing the corresponding element of each ofstreamAandstreamBtofunction. -
Uses of Beta in com.google.common.graph
Classes in com.google.common.graph with annotations of type BetaModifier and TypeClassDescriptionclassThis class provides a skeletal implementation ofGraph.classAbstractNetwork<N,E> This class provides a skeletal implementation ofNetwork.classAbstractValueGraph<N,V> This class provides a skeletal implementation ofValueGraph.final classElementOrder<T>Used to represent the order of elements in a data structure that supports different options for iteration order guarantees.classEndpointPair<N>An immutable pair representing the two endpoints of an edge in a graph.interfaceGraph<N>An interface for graph-structured data, whose edges are anonymous entities with no identity or information of their own.final classGraphBuilder<N>A builder for constructing instances ofMutableGraphorImmutableGraphwith user-defined properties.final classclassAGraphwhose elements and structural relationships will never change.final classImmutableNetwork<N,E> ANetworkwhose elements and structural relationships will never change.final classImmutableValueGraph<N,V> AValueGraphwhose elements and structural relationships will never change.interfaceMutableGraph<N>A subinterface ofGraphwhich adds mutation methods.interfaceMutableNetwork<N,E> A subinterface ofNetworkwhich adds mutation methods.interfaceMutableValueGraph<N,V> A subinterface ofValueGraphwhich adds mutation methods.interfaceNetwork<N,E> An interface for graph-structured data, whose edges are unique objects.final classNetworkBuilder<N,E> A builder for constructing instances ofMutableNetworkorImmutableNetworkwith user-defined properties.interfaceA functional interface for graph-structured data.interfaceA functional interface for graph-structured data.classTraverser<N>An object that can traverse the nodes that are reachable from a specified (set of) start node(s) using a specifiedSuccessorsFunction.interfaceValueGraph<N,V> An interface for graph-structured data, whose edges have associated non-unique values.final classValueGraphBuilder<N,V> A builder for constructing instances ofMutableValueGraphorImmutableValueGraphwith user-defined properties. -
Uses of Beta in com.google.common.hash
Classes in com.google.common.hash with annotations of type BetaModifier and TypeClassDescriptionfinal classBloomFilter<T extends @Nullable Object>A Bloom filter for instances ofT.interfaceAn object which can send data from an object of typeTinto aPrimitiveSink.final classFunnels for common types.interfaceAPrimitiveSinkthat can compute a hash code after reading the input.final classAnInputStreamthat maintains a hash of the data read from it.final classAnOutputStreamthat maintains a hash of the data written to it.interfaceAn object which can receive a stream of primitive values. -
Uses of Beta in com.google.common.io
Classes in com.google.common.io with annotations of type BetaModifier and TypeInterfaceDescriptioninterfaceByteProcessor<T extends @Nullable Object>A callback interface to process bytes from a stream.final classUtility methods for working withCloseableobjects.final classfinal classAnInputStreamthat counts the number of bytes read.final classAnOutputStreamthat starts buffering to a byte array, but switches to file buffering once the data reaches a configurable size.final classUtility methods for working withFlushableobjects.final classException indicating that a recursive delete can't be performed because the file system does not have the support necessary to guarantee that it is not vulnerable to race conditions that would allow it to delete files and directories outside of the directory being deleted (i.e.,SecureDirectoryStreamis not supported).interfaceLineProcessor<T extends @Nullable Object>A callback to be used with the streamingreadLinesmethods.final classA class for reading lines of text.final classAn implementation ofDataInputthat uses little-endian byte ordering for readingshort,int,float,double, andlongvalues.final classAn implementation ofDataOutputthat uses little-endian byte ordering for writingchar,short,int,float,double, andlongvalues.final classfinal classFile name filter that only accepts files matching a regular expression.enumOptions for use with recursive delete methods (MoreFiles.deleteRecursively(java.nio.file.Path, com.google.common.io.RecursiveDeleteOption...)andMoreFiles.deleteDirectoryContents(java.nio.file.Path, com.google.common.io.RecursiveDeleteOption...)).Methods in com.google.common.io with annotations of type BetaModifier and TypeMethodDescriptionCharSource.asByteSource(Charset charset) Returns aByteSourceview of this char source that encodes chars read from this source as bytes using the givenCharset.static WriterCharStreams.asWriter(Appendable target) Returns a Writer that sends all output to the givenAppendabletarget.static FileFiles.createTempDir()Deprecated.For Android users, see the Data and File Storage overview to select an appropriate temporary directory (perhapscontext.getCacheDir()).static longByteStreams.exhaust(InputStream in) Reads and discards data from the givenInputStreamuntil the end of the stream is reached.static longReads and discards data from the givenReadableuntil the end of the stream is reached.Files.fileTraverser()Returns aTraverserinstance for the file and directory tree.voidCharSource.forEachLine(Consumer<? super String> action) Reads all lines of text from this source, running the givenactionfor each line as it is read.longCharSource.length()Returns the length of this source in chars, even if doing so requires opening and traversing an entire stream.CharSource.lengthIfKnown()Returns the size of this source in chars, if the size can be easily determined without actually opening the data stream.static InputStreamByteStreams.limit(InputStream in, long limit) Wraps aInputStream, limiting the number of bytes which can be read.CharSource.lines()Opens a newStreamfor reading text one line at a time from this source.static ByteArrayDataInputByteStreams.newDataInput(byte[] bytes) Returns a newByteArrayDataInputinstance to read from thebytesarray from the beginning.static ByteArrayDataInputByteStreams.newDataInput(byte[] bytes, int start) Returns a newByteArrayDataInputinstance to read from thebytesarray, starting at the given position.static ByteArrayDataInputByteStreams.newDataInput(ByteArrayInputStream byteArrayInputStream) Returns a newByteArrayDataInputinstance to read from the givenByteArrayInputStream.static ByteArrayDataOutputByteStreams.newDataOutput()Returns a newByteArrayDataOutputinstance with a default size.static ByteArrayDataOutputByteStreams.newDataOutput(int size) Returns a newByteArrayDataOutputinstance sized to holdsizebytes before resizing.static ByteArrayDataOutputByteStreams.newDataOutput(ByteArrayOutputStream byteArrayOutputStream) Returns a newByteArrayDataOutputinstance which writes to the givenByteArrayOutputStream.static OutputStreamByteStreams.nullOutputStream()Returns anOutputStreamthat simply discards written bytes.static WriterCharStreams.nullWriter()Returns aWriterthat simply discards written chars.<T extends @Nullable Object>
TByteSource.read(ByteProcessor<T> processor) Reads the contents of this byte source using the givenprocessorto process bytes as they are read.static intByteStreams.read(InputStream in, byte[] b, int off, int len) Reads some bytes from an input stream and stores them into the buffer arrayb.static <T extends @Nullable Object>
TByteStreams.readBytes(InputStream input, ByteProcessor<T> processor) Process the bytes of the given input stream using the given processor.static voidByteStreams.readFully(InputStream in, byte[] b) Attempts to read enough bytes from the stream to fill the given byte array, with the same behavior asDataInput.readFully(byte[]).static voidByteStreams.readFully(InputStream in, byte[] b, int off, int len) Attempts to readlenbytes from the stream into the given array starting atoff, with the same behavior asDataInput.readFully(byte[], int, int).<T extends @Nullable Object>
TCharSource.readLines(LineProcessor<T> processor) Reads lines of text from this source, processing each line as it is read using the givenprocessor.Reads all of the lines from aReadableobject.static <T extends @Nullable Object>
TCharStreams.readLines(Readable readable, LineProcessor<T> processor) Streams lines from aReadableobject, stopping when the processor returnsfalseor all lines have been read and returning the result produced by the processor.ByteSource.sizeIfKnown()Returns the size of this source in bytes, if the size can be easily determined without actually opening the data stream.static voidByteStreams.skipFully(InputStream in, long n) Discardsnbytes of data from the input stream.static voidDiscardsncharacters of data from the reader.voidCharSink.writeLines(Stream<? extends CharSequence> lines) Writes the given lines of text to this sink with each line (including the last) terminated with the operating system's default line separator.voidCharSink.writeLines(Stream<? extends CharSequence> lines, String lineSeparator) Writes the given lines of text to this sink with each line (including the last) terminated with the given line separator. -
Uses of Beta in com.google.common.math
Classes in com.google.common.math with annotations of type BetaModifier and TypeClassDescriptionclassThe representation of a linear transformation between real numbersxandy.final classAn immutable value object capturing some basic statistics about a collection of paired double values (e.g.final classA mutable object which accumulates paired double values (e.g.final classProvides a fluent API for calculating quantiles.final classA bundle of statistical summary values -- sum, count, mean/average, min and max, and several forms of variance -- that were computed from a single set of zero or more floating-point values.final classA mutable object which accumulates double values and tracks some basic statistics over all the values added so far.Methods in com.google.common.math with annotations of type BetaModifier and TypeMethodDescriptionstatic BigIntegerBigIntegerMath.ceilingPowerOfTwo(BigInteger x) Returns the smallest power of two greater than or equal tox.static intIntMath.ceilingPowerOfTwo(int x) Returns the smallest power of two greater than or equal tox.static longLongMath.ceilingPowerOfTwo(long x) Returns the smallest power of two greater than or equal tox.static BigIntegerBigIntegerMath.floorPowerOfTwo(BigInteger x) Returns the largest power of two less than or equal tox.static intIntMath.floorPowerOfTwo(int x) Returns the largest power of two less than or equal tox.static longLongMath.floorPowerOfTwo(long x) Returns the largest power of two less than or equal tox.static booleanIntMath.isPrime(int n) Returnstrueifnis a prime number: an integer greater than one that cannot be factored into a product of smaller positive integers.static booleanLongMath.isPrime(long n) Returnstrueifnis a prime number: an integer greater than one that cannot be factored into a product of smaller positive integers.static intIntMath.saturatedAdd(int a, int b) Returns the sum ofaandbunless it would overflow or underflow in which caseInteger.MAX_VALUEorInteger.MIN_VALUEis returned, respectively.static longLongMath.saturatedAdd(long a, long b) Returns the sum ofaandbunless it would overflow or underflow in which caseLong.MAX_VALUEorLong.MIN_VALUEis returned, respectively.static intIntMath.saturatedMultiply(int a, int b) Returns the product ofaandbunless it would overflow or underflow in which caseInteger.MAX_VALUEorInteger.MIN_VALUEis returned, respectively.static longLongMath.saturatedMultiply(long a, long b) Returns the product ofaandbunless it would overflow or underflow in which caseLong.MAX_VALUEorLong.MIN_VALUEis returned, respectively.static intIntMath.saturatedPow(int b, int k) Returns thebto thekth power, unless it would overflow or underflow in which caseInteger.MAX_VALUEorInteger.MIN_VALUEis returned, respectively.static longLongMath.saturatedPow(long b, int k) Returns thebto thekth power, unless it would overflow or underflow in which caseLong.MAX_VALUEorLong.MIN_VALUEis returned, respectively.static intIntMath.saturatedSubtract(int a, int b) Returns the difference ofaandbunless it would overflow or underflow in which caseInteger.MAX_VALUEorInteger.MIN_VALUEis returned, respectively.static longLongMath.saturatedSubtract(long a, long b) Returns the difference ofaandbunless it would overflow or underflow in which caseLong.MAX_VALUEorLong.MIN_VALUEis returned, respectively. -
Uses of Beta in com.google.common.primitives
Classes in com.google.common.primitives with annotations of type BetaModifier and TypeClassDescriptionfinal classAn immutable array ofdoublevalues, with an API resemblingList.final classAn immutable array ofintvalues, with an API resemblingList.final classAn immutable array oflongvalues, with an API resemblingList.final classStatic utility methods pertaining tointprimitives that interpret values as unsigned (that is, any negative valuexis treated as the positive value2^32 + x).final classStatic utility methods pertaining tolongprimitives that interpret values as unsigned (that is, any negative valuexis treated as the positive value2^64 + x).Methods in com.google.common.primitives with annotations of type BetaModifier and TypeMethodDescriptionstatic charChars.constrainToRange(char value, char min, char max) Returns the value nearest tovaluewhich is within the closed range[min..max].static doubleDoubles.constrainToRange(double value, double min, double max) Returns the value nearest tovaluewhich is within the closed range[min..max].static floatFloats.constrainToRange(float value, float min, float max) Returns the value nearest tovaluewhich is within the closed range[min..max].static intInts.constrainToRange(int value, int min, int max) Returns the value nearest tovaluewhich is within the closed range[min..max].static longLongs.constrainToRange(long value, long min, long max) Returns the value nearest tovaluewhich is within the closed range[min..max].static shortShorts.constrainToRange(short value, short min, short max) Returns the value nearest tovaluewhich is within the closed range[min..max].static intBooleans.countTrue(boolean... values) Returns the number ofvaluesthat aretrue.static Comparator<Boolean>Booleans.falseFirst()Returns aComparator<Boolean>that sortsfalsebeforetrue.static byteUnsignedBytes.parseUnsignedByte(String string) Returns the unsignedbytevalue represented by the given decimal string.static byteUnsignedBytes.parseUnsignedByte(String string, int radix) Returns the unsignedbytevalue represented by a string with the given radix.Doubles.stringConverter()Returns a serializable converter object that converts between strings and doubles usingDouble.valueOf(java.lang.String)andDouble.toString().Floats.stringConverter()Returns a serializable converter object that converts between strings and floats usingFloat.valueOf(java.lang.String)andFloat.toString().Ints.stringConverter()Returns a serializable converter object that converts between strings and integers usingInteger.decode(java.lang.String)andInteger.toString().Longs.stringConverter()Returns a serializable converter object that converts between strings and longs usingLong.decode(java.lang.String)andLong.toString().Shorts.stringConverter()Returns a serializable converter object that converts between strings and shorts usingShort.decode(java.lang.String)andShort.toString().static StringUnsignedBytes.toString(byte x) Returns a string representation of x, where x is treated as unsigned.static StringUnsignedBytes.toString(byte x, int radix) Returns a string representation ofxfor the given radix, wherexis treated as unsigned.static Comparator<Boolean>Booleans.trueFirst()Returns aComparator<Boolean>that sortstruebeforefalse.static DoubleParses the specified string as a double-precision floating point value.static FloatParses the specified string as a single-precision floating point value.static IntegerParses the specified string as a signed decimal integer value.static IntegerParses the specified string as a signed integer value using the specified radix.static LongParses the specified string as a signed decimal long value.static LongParses the specified string as a signed long value using the specified radix. -
Uses of Beta in com.google.common.reflect
Classes in com.google.common.reflect with annotations of type BetaModifier and TypeClassDescriptionclassInvokable<T,R> Wrapper around either aMethodor aConstructor.final classRepresents a method or constructor parameter.Methods in com.google.common.reflect with annotations of type Beta -
Uses of Beta in com.google.common.util.concurrent
Classes in com.google.common.util.concurrent with annotations of type BetaModifier and TypeClassDescriptionclassAbstractListeningExecutorServiceimplementation that createsListenableFutureinstances for eachRunnableandCallablesubmitted to it.classTheCycleDetectingLockFactorycreatesReentrantLockinstances andReentrantReadWriteLockinstances that detect potential deadlock by checking for cycles in lock acquisition order.static enumPre-definedCycleDetectingLockFactory.Policyimplementations.static interfaceEncapsulates the action to be taken when a potential deadlock is encountered.static final classRepresents a detected cycle in lock acquisition ordering.static final classCycleDetectingLockFactory.WithExplicitOrdering<E extends Enum<E>>ACycleDetectingLockFactory.WithExplicitOrderingprovides the additional enforcement of an application-specified ordering of lock acquisitions.final classA TimeLimiter implementation which actually does not attempt to limit time at all.static final classFutures.FutureCombiner<V extends @Nullable Object>A helper to create a newListenableFuturewhose result is generated from a combination of input futures.final classUtilities necessary for working with libraries that supply plainFutureinstances.classA rate limiter.final classStatic utility methods pertaining to theRunnableinterface.final classA TimeLimiter that runs method calls in the background using anExecutorService.classStriped<L>A stripedLock/Semaphore/ReadWriteLock.interfaceImposes a time limit on method calls.Methods in com.google.common.util.concurrent with annotations of type BetaModifier and TypeMethodDescriptionstatic voidMoreExecutors.addDelayedShutdownHook(ExecutorService service, long terminationTimeout, TimeUnit timeUnit) Add a shutdown hook to wait for thread completion in the givenservice.static voidMoreExecutors.addDelayedShutdownHook(ExecutorService service, Duration terminationTimeout) Add a shutdown hook to wait for thread completion in the givenservice.protected voidAbstractFuture.afterDone()Callback method that is called exactly once after the future is completed.static <V extends @Nullable Object>
ListenableFuture<List<V>>Futures.allAsList(ListenableFuture<? extends V>... futures) Creates a newListenableFuturewhose value is a list containing the values of all its input futures, if all succeed.static <V extends @Nullable Object>
ListenableFuture<List<V>>Futures.allAsList(Iterable<? extends ListenableFuture<? extends V>> futures) Creates a newListenableFuturewhose value is a list containing the values of all its input futures, if all succeed.static <T extends @Nullable Object>
AsyncCallable<T>Callables.asAsyncCallable(Callable<T> callable, ListeningExecutorService listeningExecutorService) Creates anAsyncCallablefrom aCallable.final <X extends Throwable>
FluentFuture<V>FluentFuture.catching(Class<X> exceptionType, Function<? super X, ? extends V> fallback, Executor executor) Returns aFuturewhose result is taken from thisFutureor, if thisFuturefails with the givenexceptionType, from the result provided by thefallback.static <V extends @Nullable Object,X extends Throwable>
ListenableFuture<V>Futures.catching(ListenableFuture<? extends V> input, Class<X> exceptionType, Function<? super X, ? extends V> fallback, Executor executor) Returns aFuturewhose result is taken from the given primaryinputor, if the primary input fails with the givenexceptionType, from the result provided by thefallback.final <X extends Throwable>
FluentFuture<V>FluentFuture.catchingAsync(Class<X> exceptionType, AsyncFunction<? super X, ? extends V> fallback, Executor executor) Returns aFuturewhose result is taken from thisFutureor, if thisFuturefails with the givenexceptionType, from the result provided by thefallback.static <V extends @Nullable Object,X extends Throwable>
ListenableFuture<V>Futures.catchingAsync(ListenableFuture<? extends V> input, Class<X> exceptionType, AsyncFunction<? super X, ? extends V> fallback, Executor executor) Returns aFuturewhose result is taken from the given primaryinputor, if the primary input fails with the givenexceptionType, from the result provided by thefallback.protected voidAbstractService.doCancelStart()This method is called byAbstractService.stopAsync()when the service is still starting (i.e.Futures.getChecked(Future<V> future, Class<X> exceptionClass) Returns the result ofFuture.get(), converting most exceptions to a new instance of the given checked exception type.Futures.getChecked(Future<V> future, Class<X> exceptionClass, long timeout, TimeUnit unit) Returns the result ofFuture.get(long, TimeUnit), converting most exceptions to a new instance of the given checked exception type.Futures.getChecked(Future<V> future, Class<X> exceptionClass, Duration timeout) Returns the result ofFuture.get(long, TimeUnit), converting most exceptions to a new instance of the given checked exception type.static ExecutorServiceMoreExecutors.getExitingExecutorService(ThreadPoolExecutor executor) Converts the given ThreadPoolExecutor into an ExecutorService that exits when the application is complete.static ExecutorServiceMoreExecutors.getExitingExecutorService(ThreadPoolExecutor executor, long terminationTimeout, TimeUnit timeUnit) Converts the given ThreadPoolExecutor into an ExecutorService that exits when the application is complete.static ExecutorServiceMoreExecutors.getExitingExecutorService(ThreadPoolExecutor executor, Duration terminationTimeout) Converts the given ThreadPoolExecutor into an ExecutorService that exits when the application is complete.static ScheduledExecutorServiceMoreExecutors.getExitingScheduledExecutorService(ScheduledThreadPoolExecutor executor) Converts the given ScheduledThreadPoolExecutor into a ScheduledExecutorService that exits when the application is complete.static ScheduledExecutorServiceMoreExecutors.getExitingScheduledExecutorService(ScheduledThreadPoolExecutor executor, long terminationTimeout, TimeUnit timeUnit) Converts the given ScheduledThreadPoolExecutor into a ScheduledExecutorService that exits when the application is complete.static ScheduledExecutorServiceMoreExecutors.getExitingScheduledExecutorService(ScheduledThreadPoolExecutor executor, Duration terminationTimeout) Converts the given ScheduledThreadPoolExecutor into a ScheduledExecutorService that exits when the application is complete.Futures.lazyTransform(Future<I> input, Function<? super I, ? extends O> function) LikeFutures.transform(ListenableFuture, Function, Executor)except that the transformationfunctionis invoked on each call toget()on the returned future.static ThreadFactoryMoreExecutors.platformThreadFactory()Returns a default thread factory used to create new threads.booleanAtomicLongMap.removeIfZero(K key) Atomically removekeyfrom the map iff its associated value is 0.static booleanMoreExecutors.shutdownAndAwaitTermination(ExecutorService service, long timeout, TimeUnit unit) Shuts down the given executor service gradually, first disabling new submissions and later, if necessary, cancelling remaining tasks.static booleanMoreExecutors.shutdownAndAwaitTermination(ExecutorService service, Duration timeout) Shuts down the given executor service gradually, first disabling new submissions and later, if necessary, cancelling remaining tasks.static <V extends @Nullable Object>
ListenableFuture<List<@Nullable V>>Futures.successfulAsList(ListenableFuture<? extends V>... futures) Creates a newListenableFuturewhose value is a list containing the values of all its successful input futures.static <V extends @Nullable Object>
ListenableFuture<List<@Nullable V>>Futures.successfulAsList(Iterable<? extends ListenableFuture<? extends V>> futures) Creates a newListenableFuturewhose value is a list containing the values of all its successful input futures.final <T extends @Nullable Object>
FluentFuture<T>Returns a newFuturewhose result is derived from the result of thisFuture.static <I extends @Nullable Object,O extends @Nullable Object>
ListenableFuture<O>Futures.transform(ListenableFuture<I> input, Function<? super I, ? extends O> function, Executor executor) Returns a newFuturewhose result is derived from the result of the givenFuture.final <T extends @Nullable Object>
FluentFuture<T>FluentFuture.transformAsync(AsyncFunction<? super V, T> function, Executor executor) Returns a newFuturewhose result is asynchronously derived from the result of thisFuture.static <I extends @Nullable Object,O extends @Nullable Object>
ListenableFuture<O>Futures.transformAsync(ListenableFuture<I> input, AsyncFunction<? super I, ? extends O> function, Executor executor) Returns a newFuturewhose result is asynchronously derived from the result of the givenFuture.protected voidAbstractExecutionThreadService.triggerShutdown()Invoked to request the service to stop.static <V extends @Nullable Object>
Futures.FutureCombiner<V>Futures.whenAllComplete(ListenableFuture<? extends V>... futures) Creates aFutures.FutureCombinerthat processes the completed futures whether or not they're successful.static <V extends @Nullable Object>
Futures.FutureCombiner<V>Futures.whenAllComplete(Iterable<? extends ListenableFuture<? extends V>> futures) Creates aFutures.FutureCombinerthat processes the completed futures whether or not they're successful.static <V extends @Nullable Object>
Futures.FutureCombiner<V>Futures.whenAllSucceed(ListenableFuture<? extends V>... futures) Creates aFutures.FutureCombinerrequiring that all passed in futures are successful.static <V extends @Nullable Object>
Futures.FutureCombiner<V>Futures.whenAllSucceed(Iterable<? extends ListenableFuture<? extends V>> futures) Creates aFutures.FutureCombinerrequiring that all passed in futures are successful.final FluentFuture<V>FluentFuture.withTimeout(long timeout, TimeUnit unit, ScheduledExecutorService scheduledExecutor) Returns a future that delegates to this future but will finish early (via aTimeoutExceptionwrapped in anExecutionException) if the specified timeout expires.final FluentFuture<V>FluentFuture.withTimeout(Duration timeout, ScheduledExecutorService scheduledExecutor) Returns a future that delegates to this future but will finish early (via aTimeoutExceptionwrapped in anExecutionException) if the specified timeout expires.static <V extends @Nullable Object>
ListenableFuture<V>Futures.withTimeout(ListenableFuture<V> delegate, long time, TimeUnit unit, ScheduledExecutorService scheduledExecutor) Returns a future that delegates to another but will finish early (via aTimeoutExceptionwrapped in anExecutionException) if the specified duration expires.static <V extends @Nullable Object>
ListenableFuture<V>Futures.withTimeout(ListenableFuture<V> delegate, Duration time, ScheduledExecutorService scheduledExecutor) Returns a future that delegates to another but will finish early (via aTimeoutExceptionwrapped in anExecutionException) if the specified duration expires. -
Uses of Beta in com.google.thirdparty.publicsuffix
Classes in com.google.thirdparty.publicsuffix with annotations of type BetaModifier and TypeClassDescriptionfinal classDo not use this class directly.enumDo not use this class directly.
Traverserinstead.