Uses of Interface
com.google.common.base.Predicate
Packages that use Predicate
Package
Description
Basic utility libraries and interfaces.
Collection interfaces and implementations, and other utilities for collections.
An API for representing graph (node and edge) data.
Hash functions and related structures.
Utility methods and classes for I/O; for example input streams, output streams, readers, writers,
and files.
Utilities for reflection.
Testing utilities.
-
Uses of Predicate in com.google.common.base
Classes in com.google.common.base that implement PredicateModifier and TypeClassDescriptionclass
private static final class
Implementation ofCharMatcher.and(CharMatcher)
.private static final class
Implementation ofCharMatcher.any()
.private static final class
Implementation ofCharMatcher.anyOf(CharSequence)
for three or more characters.private static final class
Implementation ofCharMatcher.ascii()
.private static final class
Fast matcher using aBitSet
table of matching characters.private static final class
Implementation ofCharMatcher.breakingWhitespace()
.private static final class
Implementation ofCharMatcher.digit()
.(package private) static class
A matcher for which precomputation will not yield any significant benefit.private static final class
Implementation ofCharMatcher.forPredicate(Predicate)
.private static final class
Implementation ofCharMatcher.inRange(char, char)
.private static final class
Implementation ofCharMatcher.invisible()
.private static final class
Implementation ofCharMatcher.is(char)
.private static final class
Implementation ofCharMatcher.anyOf(CharSequence)
for exactly two characters.private static final class
Implementation ofCharMatcher.isNot(char)
.private static final class
Implementation ofCharMatcher.javaDigit()
.private static final class
Implementation ofCharMatcher.javaIsoControl()
.private static final class
Implementation ofCharMatcher.javaLetter()
.private static final class
Implementation ofCharMatcher.javaLetterOrDigit()
.private static final class
Implementation ofCharMatcher.javaLowerCase()
.private static final class
Implementation ofCharMatcher.javaUpperCase()
.(package private) static class
CharMatcher.FastMatcher
which overridestoString()
with a custom name.private static class
Implementation ofCharMatcher.Negated.negate()
.private static class
Negation of aCharMatcher.FastMatcher
.private static final class
Implementation ofCharMatcher.none()
.private static final class
Implementation ofCharMatcher.or(CharMatcher)
.private static class
Implementation that matches characters that fall within multiple ranges.private static final class
Implementation ofCharMatcher.singleWidth()
.(package private) static final class
Implementation ofCharMatcher.whitespace()
.private static final class
private static class
private static class
private static class
private static class
private static class
private static class
private static class
private static class
(package private) static enum
private static class
private static class
(package private) final class
An immutable version of CharMatcher for smallish sets of characters that uses a hash table with linear probing to check for matches.Fields in com.google.common.base declared as PredicateModifier and TypeFieldDescriptionPredicates.CompositionPredicate.p
CharMatcher.ForPredicate.predicate
Functions.PredicateFunction.predicate
Predicates.NotPredicate.predicate
Fields in com.google.common.base with type parameters of type PredicateModifier and TypeFieldDescriptionPredicates.AndPredicate.components
Predicates.OrPredicate.components
Methods in com.google.common.base that return PredicateModifier and TypeMethodDescriptionstatic <T> Predicate
<T> Predicates.alwaysFalse()
Returns a predicate that always evaluates tofalse
.static <T> Predicate
<T> Predicates.alwaysTrue()
Returns a predicate that always evaluates totrue
.static <T> Predicate
<T> Returns a predicate that evaluates totrue
if each of its components evaluates totrue
.static <T> Predicate
<T> Returns a predicate that evaluates totrue
if both of its components evaluate totrue
.static <T> Predicate
<T> Returns a predicate that evaluates totrue
if each of its components evaluates totrue
.static <A,
B> Predicate <A> Returns the composition of a function and a predicate.static Predicate
<CharSequence> Returns a predicate that evaluates totrue
if theCharSequence
being tested contains any match for the given regular expression pattern.static Predicate
<CharSequence> Predicates.containsPattern
(String pattern) Returns a predicate that evaluates totrue
if theCharSequence
being tested contains any match for the given regular expression pattern.static <T> Predicate
<T> Predicates.equalTo
(T target) Returns a predicate that evaluates totrue
if the object being testedequals()
the given target or both are null.Equivalence.equivalentTo
(T target) Returns a predicate that evaluates to true if and only if the input is equivalent totarget
according to this equivalence relation.static <T> Predicate
<T> Predicates.in
(Collection<? extends T> target) Returns a predicate that evaluates totrue
if the object reference being tested is a member of the given collection.static <T> Predicate
<T> Predicates.instanceOf
(Class<?> clazz) Returns a predicate that evaluates totrue
if the object being tested is an instance of the given class.static <T> Predicate
<T> Predicates.isNull()
Returns a predicate that evaluates totrue
if the object reference being tested is null.static <T> Predicate
<T> Returns a predicate that evaluates totrue
if the given predicate evaluates tofalse
.static <T> Predicate
<T> Predicates.notNull()
Returns a predicate that evaluates totrue
if the object reference being tested is not null.static <T> Predicate
<T> Returns a predicate that evaluates totrue
if any one of its components evaluates totrue
.static <T> Predicate
<T> Returns a predicate that evaluates totrue
if either of its components evaluates totrue
.static <T> Predicate
<T> Returns a predicate that evaluates totrue
if any one of its components evaluates totrue
.Returns a predicate that evaluates totrue
if the class being tested is assignable to (is a subtype of)clazz
.(package private) <T> Predicate
<T> Predicates.IsEqualToPredicate.withNarrowedType()
(package private) <T> Predicate
<T> Predicates.ObjectPredicate.withNarrowedType()
Methods in com.google.common.base that return types with arguments of type PredicateModifier and TypeMethodDescriptionMethods in com.google.common.base with parameters of type PredicateModifier and TypeMethodDescriptionstatic <T> Predicate
<T> Returns a predicate that evaluates totrue
if each of its components evaluates totrue
.static <T> Predicate
<T> Returns a predicate that evaluates totrue
if both of its components evaluate totrue
.static <A,
B> Predicate <A> Returns the composition of a function and a predicate.static CharMatcher
CharMatcher.forPredicate
(Predicate<? super Character> predicate) Returns a matcher with identical behavior to the givenCharacter
-based predicate, but which operates on primitivechar
instances instead.Functions.forPredicate
(Predicate<T> predicate) Creates a function that returns the same boolean output as the given predicate for all inputs.static <T> Predicate
<T> Returns a predicate that evaluates totrue
if the given predicate evaluates tofalse
.static <T> Predicate
<T> Returns a predicate that evaluates totrue
if any one of its components evaluates totrue
.static <T> Predicate
<T> Returns a predicate that evaluates totrue
if either of its components evaluates totrue
.Method parameters in com.google.common.base with type arguments of type PredicateModifier and TypeMethodDescriptionstatic <T> Predicate
<T> Returns a predicate that evaluates totrue
if each of its components evaluates totrue
.static <T> Predicate
<T> Returns a predicate that evaluates totrue
if any one of its components evaluates totrue
.Constructors in com.google.common.base with parameters of type PredicateModifierConstructorDescriptionprivate
(package private)
ForPredicate
(Predicate<? super Character> predicate) (package private)
NotPredicate
(Predicate<T> predicate) private
PredicateFunction
(Predicate<T> predicate) Constructor parameters in com.google.common.base with type arguments of type PredicateModifierConstructorDescriptionprivate
AndPredicate
(List<? extends Predicate<? super T>> components) private
OrPredicate
(List<? extends Predicate<? super T>> components) -
Uses of Predicate in com.google.common.collect
Classes in com.google.common.collect that implement PredicateModifier and TypeClassDescription(package private) final class
final class
Range<C extends Comparable>
A range (or "interval") defines the boundaries around a contiguous span of values of someComparable
type; for example, "integers from 1 to 100 inclusive." Note that it is not possible to iterate over these contained values.Fields in com.google.common.collect declared as PredicateModifier and TypeFieldDescriptionMaps.FilteredEntryNavigableMap.entryPredicate
FilteredKeyMultimap.keyPredicate
Maps.FilteredKeyMap.keyPredicate
Collections2.FilteredCollection.predicate
FilteredEntryMultimap.predicate
Maps.AbstractFilteredMap.predicate
Maps.FilteredMapValues.predicate
Multisets.FilteredMultiset.predicate
Methods in com.google.common.collect that return PredicateModifier and TypeMethodDescriptionFilteredEntryMultimap.entryPredicate()
FilteredKeyMultimap.entryPredicate()
FilteredMultimap.entryPredicate()
Maps.FilteredEntryBiMap.inversePredicate
(Predicate<? super Map.Entry<K, V>> forwardPredicate) Maps.keyPredicateOnEntries
(Predicate<? super K> keyPredicate) Maps.valuePredicateOnEntries
(Predicate<? super V> valuePredicate) Methods in com.google.common.collect with parameters of type PredicateModifier and TypeMethodDescriptionstatic <T> boolean
Returnstrue
if every element initerable
satisfies the predicate.static <T> boolean
Returnstrue
if every element returned byiterator
satisfies the given predicate.final boolean
Returnstrue
if every element in this fluent iterable satisfies the predicate.static <T> boolean
Returnstrue
if any element initerable
satisfies the predicate.static <T> boolean
Returnstrue
if one or more elements returned byiterator
satisfy the given predicate.final boolean
Returnstrue
if any element in this fluent iterable satisfies the predicate.(package private) Collections2.FilteredCollection
<E> Collections2.FilteredCollection.createCombined
(Predicate<? super E> newPredicate) static <E> Collection
<E> Collections2.filter
(Collection<E> unfiltered, Predicate<? super E> predicate) Returns the elements ofunfiltered
that satisfy a predicate.final FluentIterable
<E> Returns the elements from this fluent iterable that satisfy a predicate.static <T> Iterable
<T> Returns a view ofunfiltered
containing all elements that satisfy the input predicateretainIfTrue
.static <T> UnmodifiableIterator
<T> Returns a view ofunfiltered
containing all elements that satisfy the input predicateretainIfTrue
.static <E> Multiset
<E> Returns a view of the elements ofunfiltered
that satisfy a predicate.static <E> NavigableSet
<E> Sets.filter
(NavigableSet<E> unfiltered, Predicate<? super E> predicate) Returns the elements of aNavigableSet
,unfiltered
, that satisfy a predicate.static <E> Set
<E> Returns the elements ofunfiltered
that satisfy a predicate.static <E> SortedSet
<E> Returns the elements of aSortedSet
,unfiltered
, that satisfy a predicate.(package private) static <E> Collection
<E> FilteredEntryMultimap.filterCollection
(Collection<E> collection, Predicate<? super E> predicate) static <K,
V> BiMap <K, V> Maps.filterEntries
(BiMap<K, V> unfiltered, Predicate<? super Map.Entry<K, V>> entryPredicate) Returns a bimap containing the mappings inunfiltered
that satisfy a predicate.static <K,
V> Map <K, V> Maps.filterEntries
(Map<K, V> unfiltered, Predicate<? super Map.Entry<K, V>> entryPredicate) Returns a map containing the mappings inunfiltered
that satisfy a predicate.static <K,
V> NavigableMap <K, V> Maps.filterEntries
(NavigableMap<K, V> unfiltered, Predicate<? super Map.Entry<K, V>> entryPredicate) Returns a sorted map containing the mappings inunfiltered
that satisfy a predicate.static <K,
V> SortedMap <K, V> Maps.filterEntries
(SortedMap<K, V> unfiltered, Predicate<? super Map.Entry<K, V>> entryPredicate) Returns a sorted map containing the mappings inunfiltered
that satisfy a predicate.static <K,
V> Multimap <K, V> Multimaps.filterEntries
(Multimap<K, V> unfiltered, Predicate<? super Map.Entry<K, V>> entryPredicate) Returns a multimap containing the mappings inunfiltered
that satisfy a predicate.static <K,
V> SetMultimap <K, V> Multimaps.filterEntries
(SetMultimap<K, V> unfiltered, Predicate<? super Map.Entry<K, V>> entryPredicate) Returns a multimap containing the mappings inunfiltered
that satisfy a predicate.private static <K,
V> Map <K, V> Maps.filterFiltered
(Maps.AbstractFilteredMap<K, V> map, Predicate<? super Map.Entry<K, V>> entryPredicate) Supportclear()
,removeAll()
, andretainAll()
when filtering a filtered map.private static <K,
V> BiMap <K, V> Maps.filterFiltered
(Maps.FilteredEntryBiMap<K, V> map, Predicate<? super Map.Entry<K, V>> entryPredicate) Supportclear()
,removeAll()
, andretainAll()
when filtering a filtered map.private static <K,
V> NavigableMap <K, V> Maps.filterFiltered
(Maps.FilteredEntryNavigableMap<K, V> map, Predicate<? super Map.Entry<K, V>> entryPredicate) Supportclear()
,removeAll()
, andretainAll()
when filtering a filtered navigable map.private static <K,
V> SortedMap <K, V> Maps.filterFiltered
(Maps.FilteredEntrySortedMap<K, V> map, Predicate<? super Map.Entry<K, V>> entryPredicate) Supportclear()
,removeAll()
, andretainAll()
when filtering a filtered sorted map.private static <K,
V> Multimap <K, V> Multimaps.filterFiltered
(FilteredMultimap<K, V> multimap, Predicate<? super Map.Entry<K, V>> entryPredicate) Support removal operations when filtering a filtered multimap.private static <K,
V> SetMultimap <K, V> Multimaps.filterFiltered
(FilteredSetMultimap<K, V> multimap, Predicate<? super Map.Entry<K, V>> entryPredicate) Support removal operations when filtering a filtered multimap.static <K,
V> BiMap <K, V> Maps.filterKeys
(BiMap<K, V> unfiltered, Predicate<? super K> keyPredicate) Returns a bimap containing the mappings inunfiltered
whose keys satisfy a predicate.static <K,
V> Map <K, V> Maps.filterKeys
(Map<K, V> unfiltered, Predicate<? super K> keyPredicate) Returns a map containing the mappings inunfiltered
whose keys satisfy a predicate.static <K,
V> NavigableMap <K, V> Maps.filterKeys
(NavigableMap<K, V> unfiltered, Predicate<? super K> keyPredicate) Returns a navigable map containing the mappings inunfiltered
whose keys satisfy a predicate.static <K,
V> SortedMap <K, V> Maps.filterKeys
(SortedMap<K, V> unfiltered, Predicate<? super K> keyPredicate) Returns a sorted map containing the mappings inunfiltered
whose keys satisfy a predicate.static <K,
V> ListMultimap <K, V> Multimaps.filterKeys
(ListMultimap<K, V> unfiltered, Predicate<? super K> keyPredicate) Returns a multimap containing the mappings inunfiltered
whose keys satisfy a predicate.static <K,
V> Multimap <K, V> Multimaps.filterKeys
(Multimap<K, V> unfiltered, Predicate<? super K> keyPredicate) Returns a multimap containing the mappings inunfiltered
whose keys satisfy a predicate.static <K,
V> SetMultimap <K, V> Multimaps.filterKeys
(SetMultimap<K, V> unfiltered, Predicate<? super K> keyPredicate) Returns a multimap containing the mappings inunfiltered
whose keys satisfy a predicate.static <K,
V> BiMap <K, V> Maps.filterValues
(BiMap<K, V> unfiltered, Predicate<? super V> valuePredicate) Returns a bimap containing the mappings inunfiltered
whose values satisfy a predicate.static <K,
V> Map <K, V> Maps.filterValues
(Map<K, V> unfiltered, Predicate<? super V> valuePredicate) Returns a map containing the mappings inunfiltered
whose values satisfy a predicate.static <K,
V> NavigableMap <K, V> Maps.filterValues
(NavigableMap<K, V> unfiltered, Predicate<? super V> valuePredicate) Returns a navigable map containing the mappings inunfiltered
whose values satisfy a predicate.static <K,
V> SortedMap <K, V> Maps.filterValues
(SortedMap<K, V> unfiltered, Predicate<? super V> valuePredicate) Returns a sorted map containing the mappings inunfiltered
whose values satisfy a predicate.static <K,
V> Multimap <K, V> Multimaps.filterValues
(Multimap<K, V> unfiltered, Predicate<? super V> valuePredicate) Returns a multimap containing the mappings inunfiltered
whose values satisfy a predicate.static <K,
V> SetMultimap <K, V> Multimaps.filterValues
(SetMultimap<K, V> unfiltered, Predicate<? super V> valuePredicate) Returns a multimap containing the mappings inunfiltered
whose values satisfy a predicate.static <T> T
Returns the first element initerable
that satisfies the given predicate, ordefaultValue
if none found.static <T> T
Returns the first element initerable
that satisfies the given predicate; use this method only when such an element is known to exist.static <T> T
Returns the first element initerator
that satisfies the given predicate.static <T> T
Returns the first element initerator
that satisfies the given predicate; use this method only when such an element is known to exist.FluentIterable.firstMatch
(Predicate<? super E> predicate) Returns anOptional
containing the first element in this fluent iterable that satisfies the given predicate, if such an element exists.static <T> int
Returns the index initerable
of the first element that satisfies the providedpredicate
, or-1
if the Iterable has no such elements.static <T> int
Returns the index initerator
of the first element that satisfies the providedpredicate
, or-1
if the Iterator has no such elements.Maps.FilteredEntryBiMap.inversePredicate
(Predicate<? super Map.Entry<K, V>> forwardPredicate) Maps.keyPredicateOnEntries
(Predicate<? super K> keyPredicate) (package private) static <K,
V> boolean Maps.FilteredEntryMap.removeAllKeys
(Map<K, V> map, Predicate<? super Map.Entry<K, V>> entryPredicate, Collection<?> keyCollection) (package private) boolean
FilteredEntryMultimap.removeEntriesIf
(Predicate<? super Map.Entry<K, Collection<V>>> predicate) private boolean
TreeRangeMap.SubRangeMap.SubRangeMapAsMap.removeEntryIf
(Predicate<? super Map.Entry<Range<K>, V>> predicate) (package private) static <T> T
Iterables.removeFirstMatching
(Iterable<T> removeFrom, Predicate<? super T> predicate) Removes and returns the first matching element, or returnsnull
if there is none.(package private) boolean
StandardTable.Column.removeFromColumnIf
(Predicate<? super Map.Entry<R, V>> predicate) Removes allColumn
mappings whose row key and value satisfy the given predicate.static <T> boolean
Removes, from an iterable, every element that satisfies the provided predicate.static <T> boolean
Removes every element that satisfies the provided predicate from the iterator.(package private) static <K,
V> boolean Maps.FilteredEntryMap.retainAllKeys
(Map<K, V> map, Predicate<? super Map.Entry<K, V>> entryPredicate, Collection<?> keyCollection) static <T> Optional
<T> Returns anOptional
containing the first element initerable
that satisfies the given predicate, if such an element exists.static <T> Optional
<T> Returns anOptional
containing the first element initerator
that satisfies the given predicate, if such an element exists.Maps.valuePredicateOnEntries
(Predicate<? super V> valuePredicate) Constructors in com.google.common.collect with parameters of type PredicateModifierConstructorDescription(package private)
(package private)
FilteredCollection
(Collection<E> unfiltered, Predicate<? super E> predicate) (package private)
private
FilteredEntryBiMap
(BiMap<K, V> delegate, Predicate<? super Map.Entry<K, V>> predicate, BiMap<V, K> inverse) (package private)
(package private)
(package private)
FilteredEntryNavigableMap
(NavigableMap<K, V> unfiltered, Predicate<? super Map.Entry<K, V>> entryPredicate) (package private)
FilteredEntrySetMultimap
(SetMultimap<K, V> unfiltered, Predicate<? super Map.Entry<K, V>> predicate) (package private)
(package private)
FilteredKeyListMultimap
(ListMultimap<K, V> unfiltered, Predicate<? super K> keyPredicate) (package private)
FilteredKeyMap
(Map<K, V> unfiltered, Predicate<? super K> keyPredicate, Predicate<? super Map.Entry<K, V>> entryPredicate) (package private)
(package private)
FilteredKeySetMultimap
(SetMultimap<K, V> unfiltered, Predicate<? super K> keyPredicate) (package private)
FilteredMapValues
(Map<K, V> filteredMap, Map<K, V> unfiltered, Predicate<? super Map.Entry<K, V>> predicate) (package private)
FilteredMultiset
(Multiset<E> unfiltered, Predicate<? super E> predicate) (package private)
FilteredNavigableSet
(NavigableSet<E> unfiltered, Predicate<? super E> predicate) (package private)
FilteredSet
(Set<E> unfiltered, Predicate<? super E> predicate) (package private)
FilteredSortedSet
(SortedSet<E> unfiltered, Predicate<? super E> predicate) -
Uses of Predicate in com.google.common.graph
Methods in com.google.common.graph that return PredicateModifier and TypeMethodDescriptionAbstractNetwork.connectedPredicate
(N nodePresent, N nodeToCheck) -
Uses of Predicate in com.google.common.hash
Classes in com.google.common.hash that implement Predicate -
Uses of Predicate in com.google.common.io
Classes in com.google.common.io that implement PredicateMethods in com.google.common.io that return PredicateModifier and TypeMethodDescriptionFiles.isDirectory()
Returns a predicate that returns the result ofFile.isDirectory()
on input files.MoreFiles.isDirectory
(LinkOption... options) Returns a predicate that returns the result ofFiles.isDirectory(Path, LinkOption...)
on input paths with the given link options.Files.isFile()
Returns a predicate that returns the result ofFile.isFile()
on input files.MoreFiles.isRegularFile
(LinkOption... options) Returns a predicate that returns the result ofFiles.isRegularFile(Path, LinkOption...)
on input paths with the given link options. -
Uses of Predicate in com.google.common.reflect
Classes in com.google.common.reflect that implement Predicate -
Uses of Predicate in com.google.common.testing
Fields in com.google.common.testing declared as PredicateModifier and TypeFieldDescriptionAbstractPackageSanityTests.classFilter
AbstractPackageSanityTests.UNDERSCORE_IN_NAME
A predicate that matches classes with an underscore in the class name.Methods in com.google.common.testing with parameters of type PredicateModifier and TypeMethodDescriptionprotected final void
AbstractPackageSanityTests.ignoreClasses
(Predicate<? super Class<?>> condition) Specifies that classes that satisfy the given predicate aren't tested for sanity.