Searched refs:collection (Results 151 - 175 of 367) sorted by path

1234567891011>>

/external/guava/guava-gwt/src-super/com/google/common/collect/super/com/google/common/collect/
H A DArrayListMultimap.java117 * Creates a new, empty {@code ArrayList} to hold the collection of values for
128 for (Collection<V> collection : backingMap().values()) {
129 ArrayList<V> arrayList = (ArrayList<V>) collection;
H A DImmutableList.java176 Collection<? extends E> collection) {
177 Object[] elements = collection.toArray();
182 @SuppressWarnings("unchecked") // collection had only Es in it
175 copyFromCollection( Collection<? extends E> collection) argument
H A DImmutableSet.java205 Collection<?> collection = (Collection<?>) elements;
206 contents.ensureCapacity(contents.size() + collection.size());
H A DImmutableSetMultimap.java219 Collection<V> collection = builderMultimap.get(checkNotNull(key));
221 collection.add(checkNotNull(value));
412 * Returns an immutable collection of all key-value pairs in the multimap.
H A DIterables.java117 Collection<?> collection = (Collection<?>) iterable;
119 return collection.contains(element);
131 * collection.
134 * collection, and {@link Iterators#removeAll} otherwise.
149 * provided collection.
152 * collection, and {@link Iterators#retainAll} otherwise.
292 * Converts an iterable into a collection. If the iterable is already a
293 * collection, it is returned. Otherwise, an {@link java.util.ArrayList} is
303 * Adds all elements in {@code iterable} to {@code collection}.
305 * @return {@code true} if {@code collection} wa
[all...]
H A DLinkedListMultimap.java832 * <p>The iterator generated by the returned collection traverses the values
914 * <p>The iterator generated by the returned collection traverses the entries
1054 Collection<V> collection = LinkedListMultimap.this.get((K) key);
1055 return collection.isEmpty() ? null : collection;
1059 Collection<V> collection = removeAll(key);
1060 return collection.isEmpty() ? null : collection;
H A DMaps.java274 * when accessing any of its collection views: <pre> {@code
626 * keyFunction} on each value in the input collection to that value
628 * key for more than one value in the input collection
663 * keyFunction} on each value in the input collection to that value
665 * key for more than one value in the input collection
769 Collection<? extends Entry<K, V>> collection) {
781 @Override public boolean removeAll(Collection<?> collection) { argument
785 @Override public boolean retainAll(Collection<?> collection) { argument
820 * attempts to modify the returned map, whether direct or via its collection
1624 @Override public boolean removeAll(Collection<?> collection) { argument
768 addAll( Collection<? extends Entry<K, V>> collection) argument
1638 retainAll(Collection<?> collection) argument
1853 removeAll(Collection<?> collection) argument
1862 retainAll(Collection<?> collection) argument
[all...]
H A DMultimaps.java330 * multimap when accessing any of its collection views: <pre> {@code
440 Collection<V> collection = unmodifiableMap.get(key);
441 return (collection == null)
442 ? null : unmodifiableValueCollection(collection);
793 * Returns an unmodifiable view of the specified collection, preserving the
797 * @param collection the collection for which to return an unmodifiable view
798 * @return an unmodifiable view of the collection
801 Collection<V> collection) {
802 if (collection instanceo
800 unmodifiableValueCollection( Collection<V> collection) argument
2198 filterCollection(Collection<V> collection, Predicate<V> predicate) argument
[all...]
H A DSets.java87 * order, not the order in which the elements appear in the given collection.
116 * exception on an empty collection, and it may be called on any iterable, not
360 * the specified collection. If the collection is an {@link EnumSet}, this
362 * the specified collection must contain at least one element, in order to
363 * determine the element type. If the collection could be empty, use
366 * @param collection the collection whose complement should be stored in the
369 * that aren't present in the given collection
370 * @throws IllegalArgumentException if {@code collection} i
373 complementOf( Collection<E> collection) argument
396 complementOf( Collection<E> collection, Class<E> type) argument
404 makeComplementByHand( Collection<E> collection, Class<E> type) argument
[all...]
H A DSynchronized.java39 * Synchronized collection views. The returned synchronized collection views are
40 * serializable if the backing collection and the mutex are serializable.
46 * <p>This class should be used by other collection classes only.
82 private static <E> Collection<E> collection( argument
83 Collection<E> collection, @Nullable Object mutex) {
84 return new SynchronizedCollection<E>(collection, mutex);
618 valuesCollection = collection(delegate().values(), mutex);
799 Collection<E> collection, @Nullable Object mutex) {
800 if (collection instanceo
798 typePreservingCollection( Collection<E> collection, @Nullable Object mutex) argument
[all...]
/external/guava/guava-gwt/src-super/com/google/common/primitives/super/com/google/common/primitives/
H A DChars.java361 * Copies a collection of {@code Character} instances into a new array of
364 * <p>Elements are copied from the argument collection as if by {@code
365 * collection.toArray()}. Calling this method is as thread-safe as calling
368 * @param collection a collection of {@code Character} objects
369 * @return an array containing the same values as {@code collection}, in the
371 * @throws NullPointerException if {@code collection} or any of its elements
374 public static char[] toArray(Collection<Character> collection) { argument
375 if (collection instanceof CharArrayAsList) {
376 return ((CharArrayAsList) collection)
[all...]
H A DInts.java363 * Copies a collection of {@code Integer} instances into a new array of
366 * <p>Elements are copied from the argument collection as if by {@code
367 * collection.toArray()}. Calling this method is as thread-safe as calling
370 * @param collection a collection of {@code Integer} objects
371 * @return an array containing the same values as {@code collection}, in the
373 * @throws NullPointerException if {@code collection} or any of its elements
376 public static int[] toArray(Collection<Integer> collection) { argument
377 if (collection instanceof IntArrayAsList) {
378 return ((IntArrayAsList) collection)
[all...]
H A DLongs.java337 * Copies a collection of {@code Long} instances into a new array of
340 * <p>Elements are copied from the argument collection as if by {@code
341 * collection.toArray()}. Calling this method is as thread-safe as calling
344 * @param collection a collection of {@code Long} objects
345 * @return an array containing the same values as {@code collection}, in the
347 * @throws NullPointerException if {@code collection} or any of its elements
350 public static long[] toArray(Collection<Long> collection) { argument
351 if (collection instanceof LongArrayAsList) {
352 return ((LongArrayAsList) collection)
[all...]
H A DShorts.java365 * Copies a collection of {@code Short} instances into a new array of
368 * <p>Elements are copied from the argument collection as if by {@code
369 * collection.toArray()}. Calling this method is as thread-safe as calling
372 * @param collection a collection of {@code Short} objects
373 * @return an array containing the same values as {@code collection}, in the
375 * @throws NullPointerException if {@code collection} or any of its elements
378 public static short[] toArray(Collection<Short> collection) { argument
379 if (collection instanceof ShortArrayAsList) {
380 return ((ShortArrayAsList) collection)
[all...]
/external/guava/guava-testlib/src/com/google/common/collect/testing/
H A DAbstractCollectionTester.java22 * Base class for collection testers.
26 * @param <E> the element type of the collection to be tested.
34 protected Collection<E> collection; field in class:AbstractCollectionTester
37 return collection;
40 // TODO: dispose of this once collection is encapsulated.
42 collection = super.resetContainer(newContents);
43 return collection;
H A DMinimalCollection.java25 * A simplistic collection which implements only the bare minimum allowed by the
78 @Override public boolean containsAll(Collection<?> collection) { argument
80 for (Object object : collection) {
87 return super.containsAll(collection);
101 * a "type A" unmodifiable collection freaks out proactively, even if there
H A DSafeTreeSet.java47 public SafeTreeSet(Collection<? extends E> collection) { argument
48 this(new TreeSet<E>(collection));
70 @Override public boolean addAll(Collection<? extends E> collection) { argument
71 for (E e : collection) {
74 return delegate.addAll(collection);
H A DSortedMapInterfaceTest.java177 private static <E> List<E> toList(Collection<E> collection) { argument
178 return new ArrayList<E>(collection);
/external/guava/guava-testlib/src/com/google/common/collect/testing/google/
H A DAbstractMultisetTester.java24 * Base class for multiset collection tests.
31 return (Multiset<E>) collection;
35 collection =
H A DUnmodifiableCollectionTests.java98 * Verifies that a collection is immutable.
100 * <p>A collection is considered immutable if:
105 * collection throw UnsupportedOperationException when those mutators
109 * @param collection the presumed-immutable collection
111 * {@code collection}. {@code collection} may or may not have {@code
115 Collection<E> collection, E sampleElement) {
119 copy.addAll(collection);
121 collection
114 assertCollectionIsUnmodifiable( Collection<E> collection, E sampleElement) argument
[all...]
/external/guava/guava-testlib/src/com/google/common/collect/testing/testers/
H A DAbstractListTester.java35 * collection in setUp(), but that caused problems when a tester changed the
36 * value of list or collection but not both.
39 return (List<E>) collection;
71 return Platform.format("expected collection %s; actual collection %s",
72 expected, this.collection);
H A DAbstractQueueTester.java24 * Base class for queue collection tests.
32 return (Queue<E>) collection;
H A DAbstractSetTester.java31 * collection in setUp(), but that caused problems when a tester changed the
32 * value of set or collection but not both.
35 return (Set<E>) collection;
H A DCollectionAddAllTester.java34 * A generic JUnit test which tests addAll operations on a collection. Can't be
48 collection.addAll(emptyCollection()));
56 collection.addAll(emptyCollection()));
65 collection.addAll(createDisjointCollection()));
72 collection.addAll(createDisjointCollection());
84 collection.addAll(MinimalCollection.of(samples.e3, samples.e0)));
85 assertTrue("should contain " + samples.e3, collection.contains(samples.e3));
86 assertTrue("should contain " + samples.e0, collection.contains(samples.e0));
93 collection.addAll(MinimalCollection.of(samples.e3, samples.e0));
105 collection
[all...]
H A DCollectionAddTester.java31 * A generic JUnit test which tests {@code add} operations on a collection.
45 collection.add(samples.e3));
52 collection.add(samples.e3);
65 collection.add(samples.e0));
75 assertTrue("add(null) should return true", collection.add(null));
83 collection.add(null);

Completed in 339 milliseconds

1234567891011>>