Uses of Interface
com.google.common.base.Predicate
Packages that use Predicate
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.
This package contains utilities to work with Java reflection.
This package contains testing utilities.
-
Uses of Predicate in com.google.common.base
Classes in com.google.common.base that implement PredicateModifier and TypeClassDescriptionclassprivate static final classImplementation ofCharMatcher.and(CharMatcher).private static final classImplementation ofCharMatcher.any().private static final classImplementation ofCharMatcher.anyOf(CharSequence)for three or more characters.private static final classImplementation ofCharMatcher.ascii().private static final classFast matcher using aBitSettable of matching characters.private static final classImplementation ofCharMatcher.breakingWhitespace().private static final classImplementation ofCharMatcher.digit().(package private) static classA matcher for which precomputation will not yield any significant benefit.private static final classImplementation ofCharMatcher.forPredicate(Predicate).private static final classImplementation ofCharMatcher.inRange(char, char).private static final classImplementation ofCharMatcher.invisible().private static final classImplementation ofCharMatcher.is(char).private static final classImplementation ofCharMatcher.anyOf(CharSequence)for exactly two characters.private static final classImplementation ofCharMatcher.isNot(char).private static final classImplementation ofCharMatcher.javaDigit().private static final classImplementation ofCharMatcher.javaIsoControl().private static final classImplementation ofCharMatcher.javaLetter().private static final classImplementation ofCharMatcher.javaLetterOrDigit().private static final classImplementation ofCharMatcher.javaLowerCase().private static final classImplementation ofCharMatcher.javaUpperCase().(package private) static classCharMatcher.FastMatcherwhich overridestoString()with a custom name.private static classImplementation ofCharMatcher.Negated.negate().(package private) static classNegation of aCharMatcher.FastMatcher.private static final classImplementation ofCharMatcher.none().private static final classImplementation ofCharMatcher.or(CharMatcher).private static classImplementation that matches characters that fall within multiple ranges.private static final classImplementation ofCharMatcher.singleWidth().(package private) static final classImplementation ofCharMatcher.whitespace().private static final classprivate static classprivate static classprivate static classprivate static classprivate static classprivate static classprivate static classprivate static class(package private) static enumprivate static classprivate static class(package private) final classAn 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.pCharMatcher.ForPredicate.predicateFunctions.PredicateFunction.predicatePredicates.NotPredicate.predicateFields in com.google.common.base with type parameters of type PredicateModifier and TypeFieldDescriptionPredicates.AndPredicate.componentsPredicates.OrPredicate.componentsMethods 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 totrueif each of its components evaluates totrue.static <T> Predicate<T>Returns a predicate that evaluates totrueif both of its components evaluate totrue.static <T> Predicate<T>Returns a predicate that evaluates totrueif 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 totrueif theCharSequencebeing tested contains any match for the given regular expression pattern.static Predicate<CharSequence>Predicates.containsPattern(String pattern) Returns a predicate that evaluates totrueif theCharSequencebeing tested contains any match for the given regular expression pattern.static <T> Predicate<T>Predicates.equalTo(T target) Returns a predicate that evaluates totrueif 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 totargetaccording to this equivalence relation.static <T> Predicate<T>Predicates.in(Collection<? extends T> target) Returns a predicate that evaluates totrueif 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 totrueif the object being tested is an instance of the given class.static <T> Predicate<T>Predicates.isNull()Returns a predicate that evaluates totrueif the object reference being tested is null.static <T> Predicate<T>Returns a predicate that evaluates totrueif the given predicate evaluates tofalse.static <T> Predicate<T>Predicates.notNull()Returns a predicate that evaluates totrueif the object reference being tested is not null.static <T> Predicate<T>Returns a predicate that evaluates totrueif any one of its components evaluates totrue.static <T> Predicate<T>Returns a predicate that evaluates totrueif either of its components evaluates totrue.static <T> Predicate<T>Returns a predicate that evaluates totrueif any one of its components evaluates totrue.Returns a predicate that evaluates totrueif 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 totrueif each of its components evaluates totrue.static <T> Predicate<T>Returns a predicate that evaluates totrueif both of its components evaluate totrue.static <A,B> Predicate<A> Returns the composition of a function and a predicate.static CharMatcherCharMatcher.forPredicate(Predicate<? super Character> predicate) Returns a matcher with identical behavior to the givenCharacter-based predicate, but which operates on primitivecharinstances 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 totrueif the given predicate evaluates tofalse.static <T> Predicate<T>Returns a predicate that evaluates totrueif any one of its components evaluates totrue.static <T> Predicate<T>Returns a predicate that evaluates totrueif 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 totrueif each of its components evaluates totrue.static <T> Predicate<T>Returns a predicate that evaluates totrueif 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) privatePredicateFunction(Predicate<T> predicate) Constructor parameters in com.google.common.base with type arguments of type PredicateModifierConstructorDescriptionprivateAndPredicate(List<? extends Predicate<? super T>> components) privateOrPredicate(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 classfinal classRange<C extends Comparable>A range (or "interval") defines the boundaries around a contiguous span of values of someComparabletype; 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.entryPredicateFilteredKeyMultimap.keyPredicateMaps.FilteredKeyMap.keyPredicateCollections2.FilteredCollection.predicateFilteredEntryMultimap.predicateMaps.AbstractFilteredMap.predicateMaps.FilteredMapValues.predicateMultisets.FilteredMultiset.predicateMethods 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> booleanReturnstrueif every element initerablesatisfies the predicate.static <T> booleanReturnstrueif every element returned byiteratorsatisfies the given predicate.final booleanReturnstrueif every element in this fluent iterable satisfies the predicate.static <T> booleanReturnstrueif any element initerablesatisfies the predicate.static <T> booleanReturnstrueif one or more elements returned byiteratorsatisfy the given predicate.final booleanReturnstrueif 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 ofunfilteredthat satisfy a predicate.final FluentIterable<E>Returns the elements from this fluent iterable that satisfy a predicate.static <T> Iterable<T>Returns a view ofunfilteredcontaining all elements that satisfy the input predicateretainIfTrue.static <T> UnmodifiableIterator<T>Returns a view ofunfilteredcontaining all elements that satisfy the input predicateretainIfTrue.static <E> Multiset<E>Returns a view of the elements ofunfilteredthat 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 ofunfilteredthat 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 inunfilteredthat 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 inunfilteredthat 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 inunfilteredthat 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 inunfilteredthat 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 inunfilteredthat 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 inunfilteredthat 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 inunfilteredwhose 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 inunfilteredwhose 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 inunfilteredwhose 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 inunfilteredwhose 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 inunfilteredwhose 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 inunfilteredwhose 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 inunfilteredwhose 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 inunfilteredwhose 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 inunfilteredwhose 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 inunfilteredwhose 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 inunfilteredwhose 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 inunfilteredwhose 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 inunfilteredwhose values satisfy a predicate.static <T> TReturns the first element initerablethat satisfies the given predicate, ordefaultValueif none found.static <T> TReturns the first element initerablethat satisfies the given predicate; use this method only when such an element is known to exist.static <T> TReturns the first element initeratorthat satisfies the given predicate.static <T> TReturns the first element initeratorthat satisfies the given predicate; use this method only when such an element is known to exist.FluentIterable.firstMatch(Predicate<? super E> predicate) Returns anOptionalcontaining the first element in this fluent iterable that satisfies the given predicate, if such an element exists.static <T> intReturns the index initerableof the first element that satisfies the providedpredicate, or-1if the Iterable has no such elements.static <T> intReturns the index initeratorof the first element that satisfies the providedpredicate, or-1if 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) booleanFilteredEntryMultimap.removeEntriesIf(Predicate<? super Map.Entry<K, Collection<V>>> predicate) private booleanTreeRangeMap.SubRangeMap.SubRangeMapAsMap.removeEntryIf(Predicate<? super Map.Entry<Range<K>, V>> predicate) (package private) static <T> TIterables.removeFirstMatching(Iterable<T> removeFrom, Predicate<? super T> predicate) Removes and returns the first matching element, or returnsnullif there is none.(package private) booleanStandardTable.Column.removeFromColumnIf(Predicate<? super Map.Entry<R, V>> predicate) Removes allColumnmappings whose row key and value satisfy the given predicate.static <T> booleanRemoves, from an iterable, every element that satisfies the provided predicate.static <T> booleanRemoves 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 anOptionalcontaining the first element initerablethat satisfies the given predicate, if such an element exists.static <T> Optional<T>Returns anOptionalcontaining the first element initeratorthat 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)privateFilteredEntryBiMap(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.classFilterAbstractPackageSanityTests.UNDERSCORE_IN_NAMEA 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 voidAbstractPackageSanityTests.ignoreClasses(Predicate<? super Class<?>> condition) Specifies that classes that satisfy the given predicate aren't tested for sanity.