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.
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 testing utilities.
-
Uses of Predicate in com.google.common.base
Classes in com.google.common.base that implement PredicateModifier and TypeClassDescriptionclassMethods 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.Methods 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 Predicate -
Uses of Predicate in com.google.common.collect
Classes in com.google.common.collect that implement PredicateModifier and TypeClassDescriptionfinal 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.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.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.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.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.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.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. -
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
Methods 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.testing
Fields in com.google.common.testing declared as PredicateModifier and TypeFieldDescriptionAbstractPackageSanityTests.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.