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.
Hash functions and related structures.
Utility methods and classes for I/O; for example input streams, output streams, readers, writers,
and files.
-
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 TypeMethodDescriptionPredicates.alwaysFalse()Returns a predicate that always evaluates tofalse.Predicates.alwaysTrue()Returns a predicate that always evaluates totrue.Returns a predicate that evaluates totrueif each of its components evaluates totrue.Returns a predicate that evaluates totrueif both of its components evaluate totrue.Returns a predicate that evaluates totrueif each of its components evaluates totrue.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.Predicates.equalTo(T target) Returns a predicate that evaluates totrueif the object being testedequals()the given target or both are null.Equivalence.equivalentTo(@Nullable T target) Returns a predicate that evaluates to true if and only if the input is equivalent totargetaccording to this equivalence relation.Predicates.in(Collection<? extends T> target) Returns a predicate that evaluates totrueif the object reference being tested is a member of the given collection.Predicates.instanceOf(Class<?> clazz) Returns a predicate that evaluates totrueif the object being tested is an instance of the given class.Predicates.isNull()Returns a predicate that evaluates totrueif the object reference being tested is null.Returns a predicate that evaluates totrueif the given predicate evaluates tofalse.Predicates.notNull()Returns a predicate that evaluates totrueif the object reference being tested is not null.Returns a predicate that evaluates totrueif any one of its components evaluates totrue.Returns a predicate that evaluates totrueif either of its components evaluates totrue.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 TypeMethodDescriptionReturns a predicate that evaluates totrueif each of its components evaluates totrue.Returns a predicate that evaluates totrueif both of its components evaluate totrue.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.Returns a predicate that evaluates totrueif the given predicate evaluates tofalse.Returns a predicate that evaluates totrueif any one of its components evaluates totrue.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 TypeMethodDescriptionReturns a predicate that evaluates totrueif each of its components evaluates totrue.Returns a predicate that evaluates totrueif any one of its components evaluates totrue. -
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."Methods in com.google.common.collect with parameters of type PredicateModifier and TypeMethodDescriptionReturnstrueif every element initerablesatisfies the predicate.Returnstrueif every element returned byiteratorsatisfies the given predicate.final booleanReturnstrueif every element in this fluent iterable satisfies the predicate.Returnstrueif any element initerablesatisfies the predicate.Returnstrueif one or more elements returned byiteratorsatisfy the given predicate.final booleanReturnstrueif any element in this fluent iterable satisfies the predicate.static <E extends @Nullable Object>
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.Returns a view ofunfilteredcontaining all elements that satisfy the input predicateretainIfTrue.static <T extends @Nullable Object>
UnmodifiableIterator<T> Returns a view ofunfilteredcontaining all elements that satisfy the input predicateretainIfTrue.Returns a view of the elements ofunfilteredthat satisfy a predicate.static <E extends @Nullable Object>
NavigableSet<E> Sets.filter(NavigableSet<E> unfiltered, Predicate<? super E> predicate) Returns the elements of aNavigableSet,unfiltered, that satisfy a predicate.Returns the elements ofunfilteredthat satisfy a predicate.Returns the elements of aSortedSet,unfiltered, that satisfy a predicate.Maps.filterEntries(BiMap<K, V> unfiltered, Predicate<? super Map.Entry<K, V>> entryPredicate) Returns a bimap containing the mappings inunfilteredthat satisfy a predicate.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 extends @Nullable Object, V extends @Nullable Object>
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.Maps.filterEntries(SortedMap<K, V> unfiltered, Predicate<? super Map.Entry<K, V>> entryPredicate) Returns a sorted map containing the mappings inunfilteredthat satisfy a predicate.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 extends @Nullable Object, V extends @Nullable Object>
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.Maps.filterKeys(BiMap<K, V> unfiltered, Predicate<? super K> keyPredicate) Returns a bimap containing the mappings inunfilteredwhose keys satisfy a predicate.Maps.filterKeys(Map<K, V> unfiltered, Predicate<? super K> keyPredicate) Returns a map containing the mappings inunfilteredwhose keys satisfy a predicate.static <K extends @Nullable Object, V extends @Nullable Object>
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.Maps.filterKeys(SortedMap<K, V> unfiltered, Predicate<? super K> keyPredicate) Returns a sorted map containing the mappings inunfilteredwhose keys satisfy a predicate.static <K extends @Nullable Object, V extends @Nullable Object>
ListMultimap<K, V> Multimaps.filterKeys(ListMultimap<K, V> unfiltered, Predicate<? super K> keyPredicate) Returns a multimap containing the mappings inunfilteredwhose keys satisfy a predicate.Multimaps.filterKeys(Multimap<K, V> unfiltered, Predicate<? super K> keyPredicate) Returns a multimap containing the mappings inunfilteredwhose keys satisfy a predicate.static <K extends @Nullable Object, V extends @Nullable Object>
SetMultimap<K, V> Multimaps.filterKeys(SetMultimap<K, V> unfiltered, Predicate<? super K> keyPredicate) Returns a multimap containing the mappings inunfilteredwhose keys satisfy a predicate.Maps.filterValues(BiMap<K, V> unfiltered, Predicate<? super V> valuePredicate) Returns a bimap containing the mappings inunfilteredwhose values satisfy a predicate.Maps.filterValues(Map<K, V> unfiltered, Predicate<? super V> valuePredicate) Returns a map containing the mappings inunfilteredwhose values satisfy a predicate.static <K extends @Nullable Object, V extends @Nullable Object>
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.Maps.filterValues(SortedMap<K, V> unfiltered, Predicate<? super V> valuePredicate) Returns a sorted map containing the mappings inunfilteredwhose values satisfy a predicate.Multimaps.filterValues(Multimap<K, V> unfiltered, Predicate<? super V> valuePredicate) Returns a multimap containing the mappings inunfilteredwhose values satisfy a predicate.static <K extends @Nullable Object, V extends @Nullable Object>
SetMultimap<K, V> Multimaps.filterValues(SetMultimap<K, V> unfiltered, Predicate<? super V> valuePredicate) Returns a multimap containing the mappings inunfilteredwhose values satisfy a predicate.Iterables.find(Iterable<? extends T> iterable, Predicate<? super T> predicate, @Nullable T defaultValue) Returns the first element initerablethat satisfies the given predicate, ordefaultValueif none found.Returns the first element initerablethat satisfies the given predicate; use this method only when such an element is known to exist.Iterators.find(Iterator<? extends T> iterator, Predicate<? super T> predicate, @Nullable T defaultValue) Returns the first element initeratorthat satisfies the given predicate.Returns 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.Returns the index initerableof the first element that satisfies the providedpredicate, or-1if the Iterable has no such elements.Returns the index initeratorof the first element that satisfies the providedpredicate, or-1if the Iterator has no such elements.Removes, from an iterable, every element that satisfies the provided predicate.Removes 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 PredicateModifier and TypeClassDescriptionfinal classBloomFilter<T extends @Nullable Object>A Bloom filter for instances ofT. -
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.