Uses of Interface
com.google.common.base.Predicate
-
Packages that use Predicate Package Description com.google.common.base Basic utility libraries and interfaces.com.google.common.collect This package contains generic collection interfaces and implementations, and other utilities for working with collections.com.google.common.graph An API for representing graph (node and edge) data.com.google.common.hash Hash functions and related structures.com.google.common.io This package contains utility methods and classes for working with Java I/O; for example input streams, output streams, readers, writers, and files.com.google.common.reflect This package contains utilities to work with Java reflection.com.google.common.testing This package contains testing utilities. -
-
Uses of Predicate in com.google.common.base
Classes in com.google.common.base that implement Predicate Modifier and Type Class Description class
CharMatcher
private static class
CharMatcher.And
Implementation ofCharMatcher.and(CharMatcher)
.private static class
CharMatcher.Any
Implementation ofCharMatcher.any()
.private static class
CharMatcher.AnyOf
Implementation ofCharMatcher.anyOf(CharSequence)
for three or more characters.private static class
CharMatcher.Ascii
Implementation ofCharMatcher.ascii()
.private static class
CharMatcher.BitSetMatcher
Fast matcher using aBitSet
table of matching characters.private static class
CharMatcher.BreakingWhitespace
Implementation ofCharMatcher.breakingWhitespace()
.private static class
CharMatcher.Digit
Implementation ofCharMatcher.digit()
.(package private) static class
CharMatcher.FastMatcher
A matcher for which precomputation will not yield any significant benefit.private static class
CharMatcher.ForPredicate
Implementation ofCharMatcher.forPredicate(Predicate)
.private static class
CharMatcher.InRange
Implementation ofCharMatcher.inRange(char, char)
.private static class
CharMatcher.Invisible
Implementation ofCharMatcher.invisible()
.private static class
CharMatcher.Is
Implementation ofCharMatcher.is(char)
.private static class
CharMatcher.IsEither
Implementation ofCharMatcher.anyOf(CharSequence)
for exactly two characters.private static class
CharMatcher.IsNot
Implementation ofCharMatcher.isNot(char)
.private static class
CharMatcher.JavaDigit
Implementation ofCharMatcher.javaDigit()
.private static class
CharMatcher.JavaIsoControl
Implementation ofCharMatcher.javaIsoControl()
.private static class
CharMatcher.JavaLetter
Implementation ofCharMatcher.javaLetter()
.private static class
CharMatcher.JavaLetterOrDigit
Implementation ofCharMatcher.javaLetterOrDigit()
.private static class
CharMatcher.JavaLowerCase
Implementation ofCharMatcher.javaLowerCase()
.private static class
CharMatcher.JavaUpperCase
Implementation ofCharMatcher.javaUpperCase()
.(package private) static class
CharMatcher.NamedFastMatcher
CharMatcher.FastMatcher
which overridestoString()
with a custom name.private static class
CharMatcher.Negated
Implementation ofCharMatcher.Negated.negate()
.(package private) static class
CharMatcher.NegatedFastMatcher
Negation of aCharMatcher.FastMatcher
.private static class
CharMatcher.None
Implementation ofCharMatcher.none()
.private static class
CharMatcher.Or
Implementation ofCharMatcher.or(CharMatcher)
.private static class
CharMatcher.RangesMatcher
Implementation that matches characters that fall within multiple ranges.private static class
CharMatcher.SingleWidth
Implementation ofCharMatcher.singleWidth()
.(package private) static class
CharMatcher.Whitespace
Implementation ofCharMatcher.whitespace()
.private static class
Equivalence.EquivalentToPredicate<T>
private static class
Predicates.AndPredicate<T>
private static class
Predicates.CompositionPredicate<A,B>
private static class
Predicates.ContainsPatternFromStringPredicate
private static class
Predicates.ContainsPatternPredicate
private static class
Predicates.InPredicate<T>
private static class
Predicates.InstanceOfPredicate<T>
private static class
Predicates.IsEqualToPredicate
private static class
Predicates.NotPredicate<T>
(package private) static class
Predicates.ObjectPredicate
private static class
Predicates.OrPredicate<T>
private static class
Predicates.SubtypeOfPredicate
(package private) class
SmallCharMatcher
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 Predicate Modifier and Type Field Description (package private) Predicate<B>
Predicates.CompositionPredicate. p
private Predicate<? super java.lang.Character>
CharMatcher.ForPredicate. predicate
private Predicate<T>
Functions.PredicateFunction. predicate
(package private) Predicate<T>
Predicates.NotPredicate. predicate
Fields in com.google.common.base with type parameters of type Predicate Modifier and Type Field Description private java.util.List<? extends Predicate<? super T>>
Predicates.AndPredicate. components
private java.util.List<? extends Predicate<? super T>>
Predicates.OrPredicate. components
Methods in com.google.common.base that return Predicate Modifier and Type Method Description static <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>
Predicates. and(Predicate<? super T>... components)
Returns a predicate that evaluates totrue
if each of its components evaluates totrue
.static <T> Predicate<T>
Predicates. and(Predicate<? super T> first, Predicate<? super T> second)
Returns a predicate that evaluates totrue
if both of its components evaluate totrue
.static <T> Predicate<T>
Predicates. and(java.lang.Iterable<? extends Predicate<? super T>> components)
Returns a predicate that evaluates totrue
if each of its components evaluates totrue
.static <A,B>
Predicate<A>Predicates. compose(Predicate<B> predicate, Function<A,? extends B> function)
Returns the composition of a function and a predicate.static Predicate<java.lang.CharSequence>
Predicates. contains(java.util.regex.Pattern pattern)
Returns a predicate that evaluates totrue
if theCharSequence
being tested contains any match for the given regular expression pattern.static Predicate<java.lang.CharSequence>
Predicates. containsPattern(java.lang.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.Predicate<T>
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(java.util.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(java.lang.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>
Predicates. not(Predicate<T> predicate)
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>
Predicates. or(Predicate<? super T>... components)
Returns a predicate that evaluates totrue
if any one of its components evaluates totrue
.static <T> Predicate<T>
Predicates. or(Predicate<? super T> first, Predicate<? super T> second)
Returns a predicate that evaluates totrue
if either of its components evaluates totrue
.static <T> Predicate<T>
Predicates. or(java.lang.Iterable<? extends Predicate<? super T>> components)
Returns a predicate that evaluates totrue
if any one of its components evaluates totrue
.static Predicate<java.lang.Class<?>>
Predicates. subtypeOf(java.lang.Class<?> clazz)
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 Predicate Modifier and Type Method Description private static <T> java.util.List<Predicate<? super T>>
Predicates. asList(Predicate<? super T> first, Predicate<? super T> second)
Methods in com.google.common.base with parameters of type Predicate Modifier and Type Method Description static <T> Predicate<T>
Predicates. and(Predicate<? super T>... components)
Returns a predicate that evaluates totrue
if each of its components evaluates totrue
.static <T> Predicate<T>
Predicates. and(Predicate<? super T> first, Predicate<? super T> second)
Returns a predicate that evaluates totrue
if both of its components evaluate totrue
.private static <T> java.util.List<Predicate<? super T>>
Predicates. asList(Predicate<? super T> first, Predicate<? super T> second)
static <A,B>
Predicate<A>Predicates. compose(Predicate<B> predicate, Function<A,? extends B> function)
Returns the composition of a function and a predicate.static CharMatcher
CharMatcher. forPredicate(Predicate<? super java.lang.Character> predicate)
Returns a matcher with identical behavior to the givenCharacter
-based predicate, but which operates on primitivechar
instances instead.static <T> Function<T,java.lang.Boolean>
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>
Predicates. not(Predicate<T> predicate)
Returns a predicate that evaluates totrue
if the given predicate evaluates tofalse
.static <T> Predicate<T>
Predicates. or(Predicate<? super T>... components)
Returns a predicate that evaluates totrue
if any one of its components evaluates totrue
.static <T> Predicate<T>
Predicates. or(Predicate<? super T> first, Predicate<? super T> second)
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 Predicate Modifier and Type Method Description static <T> Predicate<T>
Predicates. and(java.lang.Iterable<? extends Predicate<? super T>> components)
Returns a predicate that evaluates totrue
if each of its components evaluates totrue
.static <T> Predicate<T>
Predicates. or(java.lang.Iterable<? extends Predicate<? super T>> components)
Returns a predicate that evaluates totrue
if any one of its components evaluates totrue
.Constructors in com.google.common.base with parameters of type Predicate Constructor Description CompositionPredicate(Predicate<B> p, Function<A,? extends B> f)
ForPredicate(Predicate<? super java.lang.Character> predicate)
NotPredicate(Predicate<T> predicate)
PredicateFunction(Predicate<T> predicate)
Constructor parameters in com.google.common.base with type arguments of type Predicate Constructor Description AndPredicate(java.util.List<? extends Predicate<? super T>> components)
OrPredicate(java.util.List<? extends Predicate<? super T>> components)
-
Uses of Predicate in com.google.common.collect
Classes in com.google.common.collect that implement Predicate Modifier and Type Class Description (package private) class
FilteredEntryMultimap.ValuePredicate
class
Range<C extends java.lang.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 Predicate Modifier and Type Field Description private Predicate<? super java.util.Map.Entry<K,V>>
Maps.FilteredEntryNavigableMap. entryPredicate
(package private) Predicate<? super K>
FilteredKeyMultimap. keyPredicate
(package private) Predicate<? super K>
Maps.FilteredKeyMap. keyPredicate
(package private) Predicate<? super E>
Collections2.FilteredCollection. predicate
(package private) Predicate<? super java.util.Map.Entry<K,V>>
FilteredEntryMultimap. predicate
(package private) Predicate<? super java.util.Map.Entry<K,V>>
Maps.AbstractFilteredMap. predicate
(package private) Predicate<? super java.util.Map.Entry<K,V>>
Maps.FilteredMapValues. predicate
(package private) Predicate<? super E>
Multisets.FilteredMultiset. predicate
Methods in com.google.common.collect that return Predicate Modifier and Type Method Description Predicate<? super java.util.Map.Entry<K,V>>
FilteredEntryMultimap. entryPredicate()
Predicate<? super java.util.Map.Entry<K,V>>
FilteredKeyMultimap. entryPredicate()
Predicate<? super java.util.Map.Entry<K,V>>
FilteredMultimap. entryPredicate()
private static <K,V>
Predicate<java.util.Map.Entry<V,K>>Maps.FilteredEntryBiMap. inversePredicate(Predicate<? super java.util.Map.Entry<K,V>> forwardPredicate)
(package private) static <K> Predicate<java.util.Map.Entry<K,?>>
Maps. keyPredicateOnEntries(Predicate<? super K> keyPredicate)
(package private) static <V> Predicate<java.util.Map.Entry<?,V>>
Maps. valuePredicateOnEntries(Predicate<? super V> valuePredicate)
Methods in com.google.common.collect with parameters of type Predicate Modifier and Type Method Description static <T> boolean
Iterables. all(java.lang.Iterable<T> iterable, Predicate<? super T> predicate)
Returnstrue
if every element initerable
satisfies the predicate.static <T> boolean
Iterators. all(java.util.Iterator<T> iterator, Predicate<? super T> predicate)
Returnstrue
if every element returned byiterator
satisfies the given predicate.boolean
FluentIterable. allMatch(Predicate<? super E> predicate)
Returnstrue
if every element in this fluent iterable satisfies the predicate.static <T> boolean
Iterables. any(java.lang.Iterable<T> iterable, Predicate<? super T> predicate)
Returnstrue
if any element initerable
satisfies the predicate.static <T> boolean
Iterators. any(java.util.Iterator<T> iterator, Predicate<? super T> predicate)
Returnstrue
if one or more elements returned byiterator
satisfy the given predicate.boolean
FluentIterable. anyMatch(Predicate<? super E> predicate)
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> java.util.Collection<E>
Collections2. filter(java.util.Collection<E> unfiltered, Predicate<? super E> predicate)
Returns the elements ofunfiltered
that satisfy a predicate.FluentIterable<E>
FluentIterable. filter(Predicate<? super E> predicate)
Returns the elements from this fluent iterable that satisfy a predicate.static <T> java.lang.Iterable<T>
Iterables. filter(java.lang.Iterable<T> unfiltered, Predicate<? super T> retainIfTrue)
Returns a view ofunfiltered
containing all elements that satisfy the input predicateretainIfTrue
.static <T> UnmodifiableIterator<T>
Iterators. filter(java.util.Iterator<T> unfiltered, Predicate<? super T> retainIfTrue)
Returns a view ofunfiltered
containing all elements that satisfy the input predicateretainIfTrue
.static <E> Multiset<E>
Multisets. filter(Multiset<E> unfiltered, Predicate<? super E> predicate)
Returns a view of the elements ofunfiltered
that satisfy a predicate.static <E> java.util.NavigableSet<E>
Sets. filter(java.util.NavigableSet<E> unfiltered, Predicate<? super E> predicate)
Returns the elements of aNavigableSet
,unfiltered
, that satisfy a predicate.static <E> java.util.Set<E>
Sets. filter(java.util.Set<E> unfiltered, Predicate<? super E> predicate)
Returns the elements ofunfiltered
that satisfy a predicate.static <E> java.util.SortedSet<E>
Sets. filter(java.util.SortedSet<E> unfiltered, Predicate<? super E> predicate)
Returns the elements of aSortedSet
,unfiltered
, that satisfy a predicate.(package private) static <E> java.util.Collection<E>
FilteredEntryMultimap. filterCollection(java.util.Collection<E> collection, Predicate<? super E> predicate)
static <K,V>
BiMap<K,V>Maps. filterEntries(BiMap<K,V> unfiltered, Predicate<? super java.util.Map.Entry<K,V>> entryPredicate)
Returns a bimap containing the mappings inunfiltered
that satisfy a predicate.static <K,V>
java.util.Map<K,V>Maps. filterEntries(java.util.Map<K,V> unfiltered, Predicate<? super java.util.Map.Entry<K,V>> entryPredicate)
Returns a map containing the mappings inunfiltered
that satisfy a predicate.static <K,V>
java.util.NavigableMap<K,V>Maps. filterEntries(java.util.NavigableMap<K,V> unfiltered, Predicate<? super java.util.Map.Entry<K,V>> entryPredicate)
Returns a sorted map containing the mappings inunfiltered
that satisfy a predicate.static <K,V>
java.util.SortedMap<K,V>Maps. filterEntries(java.util.SortedMap<K,V> unfiltered, Predicate<? super java.util.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 java.util.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 java.util.Map.Entry<K,V>> entryPredicate)
Returns a multimap containing the mappings inunfiltered
that satisfy a predicate.private static <K,V>
java.util.Map<K,V>Maps. filterFiltered(Maps.AbstractFilteredMap<K,V> map, Predicate<? super java.util.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 java.util.Map.Entry<K,V>> entryPredicate)
Supportclear()
,removeAll()
, andretainAll()
when filtering a filtered map.private static <K,V>
java.util.NavigableMap<K,V>Maps. filterFiltered(Maps.FilteredEntryNavigableMap<K,V> map, Predicate<? super java.util.Map.Entry<K,V>> entryPredicate)
Supportclear()
,removeAll()
, andretainAll()
when filtering a filtered navigable map.private static <K,V>
java.util.SortedMap<K,V>Maps. filterFiltered(Maps.FilteredEntrySortedMap<K,V> map, Predicate<? super java.util.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 java.util.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 java.util.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>
java.util.Map<K,V>Maps. filterKeys(java.util.Map<K,V> unfiltered, Predicate<? super K> keyPredicate)
Returns a map containing the mappings inunfiltered
whose keys satisfy a predicate.static <K,V>
java.util.NavigableMap<K,V>Maps. filterKeys(java.util.NavigableMap<K,V> unfiltered, Predicate<? super K> keyPredicate)
Returns a navigable map containing the mappings inunfiltered
whose keys satisfy a predicate.static <K,V>
java.util.SortedMap<K,V>Maps. filterKeys(java.util.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>
java.util.Map<K,V>Maps. filterValues(java.util.Map<K,V> unfiltered, Predicate<? super V> valuePredicate)
Returns a map containing the mappings inunfiltered
whose values satisfy a predicate.static <K,V>
java.util.NavigableMap<K,V>Maps. filterValues(java.util.NavigableMap<K,V> unfiltered, Predicate<? super V> valuePredicate)
Returns a navigable map containing the mappings inunfiltered
whose values satisfy a predicate.static <K,V>
java.util.SortedMap<K,V>Maps. filterValues(java.util.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
Iterables. find(java.lang.Iterable<? extends T> iterable, Predicate<? super T> predicate, T defaultValue)
Returns the first element initerable
that satisfies the given predicate, ordefaultValue
if none found.static <T> T
Iterables. find(java.lang.Iterable<T> iterable, Predicate<? super T> predicate)
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
Iterators. find(java.util.Iterator<? extends T> iterator, Predicate<? super T> predicate, T defaultValue)
Returns the first element initerator
that satisfies the given predicate.static <T> T
Iterators. find(java.util.Iterator<T> iterator, Predicate<? super T> predicate)
Returns the first element initerator
that satisfies the given predicate; use this method only when such an element is known to exist.Optional<E>
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
Iterables. indexOf(java.lang.Iterable<T> iterable, Predicate<? super T> predicate)
Returns the index initerable
of the first element that satisfies the providedpredicate
, or-1
if the Iterable has no such elements.static <T> int
Iterators. indexOf(java.util.Iterator<T> iterator, Predicate<? super T> predicate)
Returns the index initerator
of the first element that satisfies the providedpredicate
, or-1
if the Iterator has no such elements.private static <K,V>
Predicate<java.util.Map.Entry<V,K>>Maps.FilteredEntryBiMap. inversePredicate(Predicate<? super java.util.Map.Entry<K,V>> forwardPredicate)
(package private) static <K> Predicate<java.util.Map.Entry<K,?>>
Maps. keyPredicateOnEntries(Predicate<? super K> keyPredicate)
(package private) static <K,V>
booleanMaps.FilteredEntryMap. removeAllKeys(java.util.Map<K,V> map, Predicate<? super java.util.Map.Entry<K,V>> entryPredicate, java.util.Collection<?> keyCollection)
(package private) boolean
FilteredEntryMultimap. removeEntriesIf(Predicate<? super java.util.Map.Entry<K,java.util.Collection<V>>> predicate)
private boolean
TreeRangeMap.SubRangeMap.SubRangeMapAsMap. removeEntryIf(Predicate<? super java.util.Map.Entry<Range<K>,V>> predicate)
(package private) static <T> T
Iterables. removeFirstMatching(java.lang.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 java.util.Map.Entry<R,V>> predicate)
Removes allColumn
mappings whose row key and value satisfy the given predicate.static <T> boolean
Iterables. removeIf(java.lang.Iterable<T> removeFrom, Predicate<? super T> predicate)
Removes, from an iterable, every element that satisfies the provided predicate.static <T> boolean
Iterators. removeIf(java.util.Iterator<T> removeFrom, Predicate<? super T> predicate)
Removes every element that satisfies the provided predicate from the iterator.(package private) static <K,V>
booleanMaps.FilteredEntryMap. retainAllKeys(java.util.Map<K,V> map, Predicate<? super java.util.Map.Entry<K,V>> entryPredicate, java.util.Collection<?> keyCollection)
static <T> Optional<T>
Iterables. tryFind(java.lang.Iterable<T> iterable, Predicate<? super T> predicate)
Returns anOptional
containing the first element initerable
that satisfies the given predicate, if such an element exists.static <T> Optional<T>
Iterators. tryFind(java.util.Iterator<T> iterator, Predicate<? super T> predicate)
Returns anOptional
containing the first element initerator
that satisfies the given predicate, if such an element exists.(package private) static <V> Predicate<java.util.Map.Entry<?,V>>
Maps. valuePredicateOnEntries(Predicate<? super V> valuePredicate)
Constructors in com.google.common.collect with parameters of type Predicate Constructor Description AbstractFilteredMap(java.util.Map<K,V> unfiltered, Predicate<? super java.util.Map.Entry<K,V>> predicate)
FilteredCollection(java.util.Collection<E> unfiltered, Predicate<? super E> predicate)
FilteredEntryBiMap(BiMap<K,V> delegate, Predicate<? super java.util.Map.Entry<K,V>> predicate)
FilteredEntryBiMap(BiMap<K,V> delegate, Predicate<? super java.util.Map.Entry<K,V>> predicate, BiMap<V,K> inverse)
FilteredEntryMap(java.util.Map<K,V> unfiltered, Predicate<? super java.util.Map.Entry<K,V>> entryPredicate)
FilteredEntryMultimap(Multimap<K,V> unfiltered, Predicate<? super java.util.Map.Entry<K,V>> predicate)
FilteredEntryNavigableMap(java.util.NavigableMap<K,V> unfiltered, Predicate<? super java.util.Map.Entry<K,V>> entryPredicate)
FilteredEntrySetMultimap(SetMultimap<K,V> unfiltered, Predicate<? super java.util.Map.Entry<K,V>> predicate)
FilteredEntrySortedMap(java.util.SortedMap<K,V> unfiltered, Predicate<? super java.util.Map.Entry<K,V>> entryPredicate)
FilteredKeyListMultimap(ListMultimap<K,V> unfiltered, Predicate<? super K> keyPredicate)
FilteredKeyMap(java.util.Map<K,V> unfiltered, Predicate<? super K> keyPredicate, Predicate<? super java.util.Map.Entry<K,V>> entryPredicate)
FilteredKeyMultimap(Multimap<K,V> unfiltered, Predicate<? super K> keyPredicate)
FilteredKeySetMultimap(SetMultimap<K,V> unfiltered, Predicate<? super K> keyPredicate)
FilteredMapValues(java.util.Map<K,V> filteredMap, java.util.Map<K,V> unfiltered, Predicate<? super java.util.Map.Entry<K,V>> predicate)
FilteredMultiset(Multiset<E> unfiltered, Predicate<? super E> predicate)
FilteredNavigableSet(java.util.NavigableSet<E> unfiltered, Predicate<? super E> predicate)
FilteredSet(java.util.Set<E> unfiltered, Predicate<? super E> predicate)
FilteredSortedSet(java.util.SortedSet<E> unfiltered, Predicate<? super E> predicate)
-
Uses of Predicate in com.google.common.graph
Methods in com.google.common.graph that return Predicate Modifier and Type Method Description private Predicate<E>
AbstractNetwork. connectedPredicate(N nodePresent, N nodeToCheck)
-
Uses of Predicate in com.google.common.hash
Classes in com.google.common.hash that implement Predicate Modifier and Type Class Description class
BloomFilter<T>
A Bloom filter for instances ofT
. -
Uses of Predicate in com.google.common.io
Classes in com.google.common.io that implement Predicate Modifier and Type Class Description private static class
Files.FilePredicate
Methods in com.google.common.io that return Predicate Modifier and Type Method Description static Predicate<java.io.File>
Files. isDirectory()
Returns a predicate that returns the result ofFile.isDirectory()
on input files.static Predicate<java.nio.file.Path>
MoreFiles. isDirectory(java.nio.file.LinkOption... options)
Returns a predicate that returns the result ofFiles.isDirectory(Path, LinkOption...)
on input paths with the given link options.static Predicate<java.io.File>
Files. isFile()
Returns a predicate that returns the result ofFile.isFile()
on input files.static Predicate<java.nio.file.Path>
MoreFiles. isRegularFile(java.nio.file.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 Modifier and Type Class Description private static class
TypeToken.TypeFilter
-
Uses of Predicate in com.google.common.testing
Fields in com.google.common.testing declared as Predicate Modifier and Type Field Description private Predicate<java.lang.Class<?>>
AbstractPackageSanityTests. classFilter
static Predicate<java.lang.Class<?>>
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 Predicate Modifier and Type Method Description protected void
AbstractPackageSanityTests. ignoreClasses(Predicate<? super java.lang.Class<?>> condition)
Specifies that classes that satisfy the given predicate aren't tested for sanity.
-