/frameworks/base/core/java/com/android/internal/util/ |
Predicates.java | 23 * {@code Predicate} objects. 31 * Returns a Predicate that evaluates to true iff each of its components 35 public static <T> Predicate<T> and(Predicate<? super T>... components) { 40 * Returns a Predicate that evaluates to true iff each of its components 44 * the behavior of this Predicate. If components is empty, the returned 45 * Predicate will always evaluate to true. 47 public static <T> Predicate<T> and(Iterable<? extends Predicate<? super T>> components) { 52 * Returns a Predicate that evaluates to true iff any one of its component 115 private final Predicate<? super T> predicate; field in class:Predicates.NotPredicate [all...] |
/external/guava/src/com/google/common/collect/ |
Collections2.java | 22 import com.google.common.base.Predicate; 81 * Returns the elements of {@code unfiltered} that satisfy a predicate. The 89 * predicate is provided. When methods such as {@code removeAll()} and 99 * it may be faster to copy {@code Iterables.filter(unfiltered, predicate)} 103 Collection<E> unfiltered, Predicate<? super E> predicate) { 107 return ((FilteredCollection<E>) unfiltered).createCombined(predicate); 111 checkNotNull(unfiltered), checkNotNull(predicate)); 128 final Predicate<? super E> predicate; field in class:Collections2.FilteredCollection [all...] |
Iterables.java | 24 import com.google.common.base.Predicate; 137 * predicate. 140 * @param predicate a predicate that determines whether an element should 149 Iterable<T> removeFrom, Predicate<? super T> predicate) { 152 (List<T>) removeFrom, checkNotNull(predicate)); 154 return Iterators.removeIf(removeFrom.iterator(), predicate); 158 List<T> list, Predicate<? super T> predicate) { [all...] |
Iterators.java | 24 import com.google.common.base.Predicate; 175 * Removes every element that satisfies the provided predicate from the 180 * @param predicate a predicate that determines whether an element should 186 Iterator<T> removeFrom, Predicate<? super T> predicate) { 187 checkNotNull(predicate); 190 if (predicate.apply(removeFrom.next())) { 595 * Returns the elements of {@code unfiltered} that satisfy a predicate. 598 final Iterator<T> unfiltered, final Predicate<? super T> predicate) [all...] |
Maps.java | 23 import com.google.common.base.Predicate; 849 * satisfy a predicate. The returned map is a live view of {@code unfiltered}; 856 * IllegalArgumentException} if a key that doesn't satisfy the predicate is 872 Map<K, V> unfiltered, final Predicate<? super K> keyPredicate) { 874 Predicate<Entry<K, V>> entryPredicate = new Predicate<Entry<K, V>>() { 887 * satisfy a predicate. The returned map is a live view of {@code unfiltered}; 894 * IllegalArgumentException} if a value that doesn't satisfy the predicate is 910 Map<K, V> unfiltered, final Predicate<? super V> valuePredicate) { 912 Predicate<Entry<K, V>> entryPredicate = new Predicate<Entry<K, V>>() [all...] |
Sets.java | 20 import com.google.common.base.Predicate; 618 final Predicate<Object> inSet2 = Predicates.in(set2); 658 final Predicate<Object> notInSet2 = Predicates.not(Predicates.in(set2)); 676 * Returns the elements of {@code unfiltered} that satisfy a predicate. The 683 * element that doesn't satisfy the predicate is provided. When methods such 694 * to copy {@code Iterables.filter(unfiltered, predicate)} and use the copy. 697 Set<E> unfiltered, Predicate<? super E> predicate) { 702 Predicate<E> combinedPredicate 703 = Predicates.<E>and(filtered.predicate, predicate) [all...] |
/external/chromium/sdch/open-vcdiff/src/gtest/ |
gtest-death-test.h | 100 // integer exit status that satisfies predicate, and emitting error output 102 #define ASSERT_EXIT(statement, predicate, regex) \ 103 GTEST_DEATH_TEST(statement, predicate, regex, GTEST_FATAL_FAILURE) 107 #define EXPECT_EXIT(statement, predicate, regex) \ 108 GTEST_DEATH_TEST(statement, predicate, regex, GTEST_NONFATAL_FAILURE) 121 // Two predicate classes that can be used in {ASSERT,EXPECT}_EXIT*:
|
/external/gtest/include/gtest/ |
gtest-death-test.h | 155 // integer exit status that satisfies predicate, and emitting error output 157 #define ASSERT_EXIT(statement, predicate, regex) \ 158 GTEST_DEATH_TEST_(statement, predicate, regex, GTEST_FATAL_FAILURE_) 162 #define EXPECT_EXIT(statement, predicate, regex) \ 163 GTEST_DEATH_TEST_(statement, predicate, regex, GTEST_NONFATAL_FAILURE_) 176 // Two predicate classes that can be used in {ASSERT,EXPECT}_EXIT*:
|
/external/protobuf/gtest/include/gtest/ |
gtest-death-test.h | 155 // integer exit status that satisfies predicate, and emitting error output 157 #define ASSERT_EXIT(statement, predicate, regex) \ 158 GTEST_DEATH_TEST_(statement, predicate, regex, GTEST_FATAL_FAILURE_) 162 #define EXPECT_EXIT(statement, predicate, regex) \ 163 GTEST_DEATH_TEST_(statement, predicate, regex, GTEST_NONFATAL_FAILURE_) 176 // Two predicate classes that can be used in {ASSERT,EXPECT}_EXIT*:
|
/external/guava/src/com/google/common/base/ |
Predicates.java | 33 * Contains static factory methods for creating {@code Predicate} instances. 49 * Returns a predicate that always evaluates to {@code true}. 53 public static <T> Predicate<T> alwaysTrue() { 54 return (Predicate<T>) AlwaysTruePredicate.INSTANCE; 58 * Returns a predicate that always evaluates to {@code false}. 62 public static <T> Predicate<T> alwaysFalse() { 63 return (Predicate<T>) AlwaysFalsePredicate.INSTANCE; 67 * Returns a predicate that evaluates to {@code true} if the object reference 71 public static <T> Predicate<T> isNull() { 72 return (Predicate<T>) IsNullPredicate.INSTANCE 251 private final Predicate<T> predicate; field in class:Predicates.NotPredicate [all...] |
Functions.java | 217 * predicate for all inputs. 219 public static <T> Function<T, Boolean> forPredicate(Predicate<T> predicate) { 220 return new PredicateFunction<T>(predicate); 226 private final Predicate<T> predicate; field in class:Functions.PredicateFunction 228 private PredicateFunction(Predicate<T> predicate) { 229 this.predicate = checkNotNull(predicate); [all...] |
CharMatcher.java | 29 * {@link Predicate} does for any {@link Object}. Also offers basic text 47 public abstract class CharMatcher implements Predicate<Character> { 500 * Character}-based predicate, but which operates on primitive {@code char} 504 final Predicate<? super Character> predicate) { 505 checkNotNull(predicate); 506 if (predicate instanceof CharMatcher) { 507 return (CharMatcher) predicate; 511 return predicate.apply(c); 514 return predicate.apply(checkNotNull(character)) [all...] |
/external/webkit/WebCore/xml/ |
XPathStep.cpp | 44 Step::Step(Axis axis, const NodeTest& nodeTest, const Vector<Predicate*>& predicates) 60 // E.g., there is no need to build a set of all "foo" nodes to evaluate "foo[@bar]", we can check the predicate while enumerating. 61 // This optimization can be applied to predicates that are not context node list sensitive, or to first predicate that is only context position sensitive, e.g. foo[position() mod 2 = 0]. 62 Vector<Predicate*> remainingPredicates; 64 Predicate* predicate = m_predicates[i]; local 65 if ((!predicate->isContextPositionSensitive() || m_nodeTest.mergedPredicates().isEmpty()) && !predicate->isContextSizeSensitive() && remainingPredicates.isEmpty()) { 66 m_nodeTest.mergedPredicates().append(predicate); 68 remainingPredicates.append(predicate); 100 Predicate* predicate = m_predicates[i]; local 106 Predicate* predicate = m_nodeTest.mergedPredicates()[i]; local 123 Predicate* predicate = m_predicates[i]; local 224 Predicate* predicate = mergedPredicates[i]; local [all...] |
/external/skia/src/images/ |
bmpdecoderhelper.h | 27 #define CHECK(predicate) SkASSERT(predicate)
|
/external/webkit/JavaScriptCore/wtf/ |
MessageQueue.h | 62 template<typename Predicate> 63 PassOwnPtr<DataType> waitForMessageFilteredWithTimeout(MessageQueueWaitResult&, Predicate&, double absoluteTime); 65 template<typename Predicate> 66 void removeIf(Predicate&); 128 template<typename Predicate> 129 inline PassOwnPtr<DataType> MessageQueue<DataType>::waitForMessageFilteredWithTimeout(MessageQueueWaitResult& result, Predicate& predicate, double absoluteTime) 135 while (!m_killed && !timedOut && (found = m_queue.findIf(predicate)) == m_queue.end()) 172 template<typename Predicate> 173 inline void MessageQueue<DataType>::removeIf(Predicate& predicate [all...] |
/external/chromium/sdch/open-vcdiff/src/gtest/internal/ |
gtest-death-test-internal.h | 109 // predicate, and its stderr output matches a user-supplied regular 111 // The user-supplied predicate may be a macro expression rather 148 #define GTEST_DEATH_TEST(statement, predicate, regex, fail) \ 162 if (!gtest_dt->Passed(predicate(gtest_dt->Wait()))) { \
|
/external/webkit/WebCore/workers/ |
WorkerRunLoop.cpp | 145 MessageQueueWaitResult WorkerRunLoop::runInMode(WorkerContext* context, const ModePredicate& predicate) 151 double absoluteTime = (predicate.isDefaultMode() && m_sharedTimer->isActive()) ? m_sharedTimer->fireTime() : MessageQueue<Task>::infiniteTime(); 153 OwnPtr<WorkerRunLoop::Task> task = m_messageQueue.waitForMessageFilteredWithTimeout(result, predicate, absoluteTime);
|
/external/astl/tests/ |
test_algorithm.cpp | 123 bool predicate(const Left2&, const Right2&) {return true;} function in namespace:android 133 EXPECT_TRUE(std::equal(&left2, &left2, &right2, predicate));
|
/external/gtest/include/gtest/internal/ |
gtest-death-test-internal.h | 114 // predicate, and its stderr output matches a user-supplied regular 116 // The user-supplied predicate may be a macro expression rather 158 #define GTEST_DEATH_TEST_(statement, predicate, regex, fail) \ 172 if (!gtest_dt->Passed(predicate(gtest_dt->Wait()))) { \
|
/external/webkit/WebCore/storage/ |
DatabaseThread.cpp | 171 SameDatabasePredicate predicate(database); 172 m_queue.removeIf(predicate);
|
/frameworks/base/media/libstagefright/include/ |
TimedEventQueue.h | 89 // Cancel any pending event that satisfies the predicate. 91 // satisfying the predicate (if any). 93 bool (*predicate)(void *cookie, const sp<Event> &event),
|
/external/protobuf/gtest/include/gtest/internal/ |
gtest-death-test-internal.h | 110 // predicate, and its stderr output matches a user-supplied regular 112 // The user-supplied predicate may be a macro expression rather 154 #define GTEST_DEATH_TEST_(statement, predicate, regex, fail) \ 168 if (!gtest_dt->Passed(predicate(gtest_dt->Wait()))) { \
|
/external/chromium/sdch/open-vcdiff/src/gtest/src/ |
gtest-internal-inl.h | 309 // Returns the number of elements that satisfy a given predicate. 310 // The parameter 'predicate' is a Boolean function or functor that 312 template <typename P> // P is the type of the predicate function/functor 313 int CountIf(P predicate) const { 318 if ( predicate(node->element()) ) { 339 // Returns the first node whose element satisfies a given predicate, 340 // or NULL if none is found. The parameter 'predicate' is a 343 template <typename P> // P is the type of the predicate function/functor. 344 const ListNode<E> * FindIf(P predicate) const { 348 if ( predicate(node->element()) ) [all...] |
/external/gtest/src/ |
gtest-internal-inl.h | 371 // Returns the number of elements that satisfy a given predicate. 372 // The parameter 'predicate' is a Boolean function or functor that 374 template <typename P> // P is the type of the predicate function/functor 375 int CountIf(P predicate) const { 380 if ( predicate(node->element()) ) { 401 // Returns the first node whose element satisfies a given predicate, 402 // or NULL if none is found. The parameter 'predicate' is a 405 template <typename P> // P is the type of the predicate function/functor. 406 const ListNode<E> * FindIf(P predicate) const { 410 if ( predicate(node->element()) ) [all...] |
/external/protobuf/gtest/src/ |
gtest-internal-inl.h | 322 // Returns the number of elements that satisfy a given predicate. 323 // The parameter 'predicate' is a Boolean function or functor that 325 template <typename P> // P is the type of the predicate function/functor 326 int CountIf(P predicate) const { 329 if (predicate(*(elements_[i]))) { 348 // Returns the first node whose element satisfies a given predicate, 349 // or NULL if none is found. The parameter 'predicate' is a 352 template <typename P> // P is the type of the predicate function/functor. 353 const E* FindIf(P predicate) const { 355 if (predicate(*elements_[i])) [all...] |