Home
last modified time | relevance | path

Searched refs:elementSet (Results 1 – 25 of 96) sorted by relevance

1234

/external/guava/guava-tests/test/com/google/common/collect/
DTreeMultisetTest.java107 return TreeMultiset.create(Arrays.asList(elements)).elementSet(); in suite()
165 SortedSet<String> elementSet = ms.elementSet(); in testElementSetSortedSetMethods() local
167 assertEquals("a", elementSet.first()); in testElementSetSortedSetMethods()
168 assertEquals("c", elementSet.last()); in testElementSetSortedSetMethods()
169 assertEquals(Ordering.natural(), elementSet.comparator()); in testElementSetSortedSetMethods()
171 assertThat(elementSet.headSet("b")).containsExactly("a"); in testElementSetSortedSetMethods()
172 assertThat(elementSet.tailSet("b")).containsExactly("b", "c").inOrder(); in testElementSetSortedSetMethods()
173 assertThat(elementSet.subSet("a", "c")).containsExactly("a", "b").inOrder(); in testElementSetSortedSetMethods()
185 SortedSet<String> elementSet = ms.elementSet(); in testElementSetSubsetRemove() local
186 assertThat(elementSet).containsExactly("a", "b", "c", "d", "e", "f").inOrder(); in testElementSetSubsetRemove()
[all …]
DLinkedHashMultisetTest.java124 assertThat(ms.elementSet()).containsExactly("a", "b", "c").inOrder();
126 assertThat(ms.elementSet()).containsExactly("a", "b", "c").inOrder();
128 assertThat(ms.elementSet()).containsExactly("a", "b", "c").inOrder();
131 assertThat(ms.elementSet()).containsExactly("a", "c", "b").inOrder();
DImmutableMultisetTest.java102 return ImmutableMultiset.copyOf(elements).elementSet(); in suite()
152 ImmutableSet<String> elementSet = in suite()
153 (ImmutableSet<String>) builder.build().elementSet(); in suite()
154 return elementSet.asList(); in suite()
377 List<TypeWithDuplicates> elements1 = ImmutableList.copyOf(ms1.elementSet()); in testToImmutableMultiset_duplicates()
378 List<TypeWithDuplicates> elements2 = ImmutableList.copyOf(ms2.elementSet()); in testToImmutableMultiset_duplicates()
379 for (int i = 0; i < ms1.elementSet().size(); i++) { in testToImmutableMultiset_duplicates()
604 Collection<String> copy = LenientSerializableTester.reserializeAndAssertLenient(c.elementSet()); in testSerialization_elementSet()
625 assertThat(ImmutableMultiset.of("c", "b", "a", "c").elementSet()) in testIterationOrder()
665 assertThat(multiset.elementSet()).containsExactly("a", "c").inOrder(); in testIterationOrderThroughBuilderRemovals()
[all …]
/external/guava/android/guava-tests/test/com/google/common/collect/
DTreeMultisetTest.java107 return TreeMultiset.create(Arrays.asList(elements)).elementSet(); in suite()
165 SortedSet<String> elementSet = ms.elementSet(); in testElementSetSortedSetMethods() local
167 assertEquals("a", elementSet.first()); in testElementSetSortedSetMethods()
168 assertEquals("c", elementSet.last()); in testElementSetSortedSetMethods()
169 assertEquals(Ordering.natural(), elementSet.comparator()); in testElementSetSortedSetMethods()
171 assertThat(elementSet.headSet("b")).containsExactly("a"); in testElementSetSortedSetMethods()
172 assertThat(elementSet.tailSet("b")).containsExactly("b", "c").inOrder(); in testElementSetSortedSetMethods()
173 assertThat(elementSet.subSet("a", "c")).containsExactly("a", "b").inOrder(); in testElementSetSortedSetMethods()
185 SortedSet<String> elementSet = ms.elementSet(); in testElementSetSubsetRemove() local
186 assertThat(elementSet).containsExactly("a", "b", "c", "d", "e", "f").inOrder(); in testElementSetSubsetRemove()
[all …]
DLinkedHashMultisetTest.java124 assertThat(ms.elementSet()).containsExactly("a", "b", "c").inOrder();
126 assertThat(ms.elementSet()).containsExactly("a", "b", "c").inOrder();
128 assertThat(ms.elementSet()).containsExactly("a", "b", "c").inOrder();
131 assertThat(ms.elementSet()).containsExactly("a", "c", "b").inOrder();
DImmutableMultisetTest.java81 return ImmutableMultiset.copyOf(elements).elementSet(); in suite()
131 ImmutableSet<String> elementSet = in suite()
132 (ImmutableSet<String>) builder.build().elementSet(); in suite()
133 return elementSet.asList(); in suite()
495 Collection<String> copy = LenientSerializableTester.reserializeAndAssertLenient(c.elementSet()); in testSerialization_elementSet()
516 assertThat(ImmutableMultiset.of("c", "b", "a", "c").elementSet()) in testIterationOrder()
556 assertThat(multiset.elementSet()).containsExactly("a", "c").inOrder(); in testIterationOrderThroughBuilderRemovals()
558 assertThat(builder.build().elementSet()).containsExactly("a", "c", "b").inOrder(); in testIterationOrderThroughBuilderRemovals()
559 assertThat(multiset.elementSet()).containsExactly("a", "c").inOrder(); in testIterationOrderThroughBuilderRemovals()
/external/guava/android/guava-testlib/src/com/google/common/collect/testing/google/
DMultisetElementSetTester.java47 Set<E> elementSet = getMultiset().elementSet(); in testElementSetReflectsAddAbsent() local
48 assertFalse(elementSet.contains(e3())); in testElementSetReflectsAddAbsent()
50 assertTrue(elementSet.contains(e3())); in testElementSetReflectsAddAbsent()
56 Set<E> elementSet = getMultiset().elementSet(); in testElementSetReflectsRemove() local
57 assertTrue(elementSet.contains(e0())); in testElementSetReflectsRemove()
59 assertFalse(elementSet.contains(e0())); in testElementSetReflectsRemove()
65 Set<E> elementSet = getMultiset().elementSet(); in testElementSetRemovePropagatesToMultiset() local
68 assertTrue(elementSet.remove(e0())); in testElementSetRemovePropagatesToMultiset()
79 Set<E> elementSet = getMultiset().elementSet(); in testElementSetRemoveDuplicatePropagatesToMultiset() local
80 assertTrue(elementSet.remove(e0())); in testElementSetRemoveDuplicatePropagatesToMultiset()
[all …]
/external/guava/guava-testlib/src/com/google/common/collect/testing/google/
DMultisetElementSetTester.java47 Set<E> elementSet = getMultiset().elementSet(); in testElementSetReflectsAddAbsent() local
48 assertFalse(elementSet.contains(e3())); in testElementSetReflectsAddAbsent()
50 assertTrue(elementSet.contains(e3())); in testElementSetReflectsAddAbsent()
56 Set<E> elementSet = getMultiset().elementSet(); in testElementSetReflectsRemove() local
57 assertTrue(elementSet.contains(e0())); in testElementSetReflectsRemove()
59 assertFalse(elementSet.contains(e0())); in testElementSetReflectsRemove()
65 Set<E> elementSet = getMultiset().elementSet(); in testElementSetRemovePropagatesToMultiset() local
68 assertTrue(elementSet.remove(e0())); in testElementSetRemovePropagatesToMultiset()
79 Set<E> elementSet = getMultiset().elementSet(); in testElementSetRemoveDuplicatePropagatesToMultiset() local
80 assertTrue(elementSet.remove(e0())); in testElementSetRemoveDuplicatePropagatesToMultiset()
[all …]
/external/exoplayer/tree/library/common/src/main/java/com/google/android/exoplayer2/util/
DCopyOnWriteMultiset.java52 private Set<E> elementSet; field in CopyOnWriteMultiset
60 elementSet = Collections.emptySet(); in CopyOnWriteMultiset()
77 Set<E> elementSet = new HashSet<>(this.elementSet); in add() local
78 elementSet.add(element); in add()
79 this.elementSet = Collections.unmodifiableSet(elementSet); in add()
103 Set<E> elementSet = new HashSet<>(this.elementSet); in remove() local
104 elementSet.remove(element); in remove()
105 this.elementSet = Collections.unmodifiableSet(elementSet); in remove()
119 public Set<E> elementSet() { in elementSet() method in CopyOnWriteMultiset
121 return elementSet; in elementSet()
/external/guava/guava/src/com/google/common/collect/
DRegularImmutableSortedMultiset.java41 @VisibleForTesting final transient RegularImmutableSortedSet<E> elementSet; field in RegularImmutableSortedMultiset
47 this.elementSet = ImmutableSortedSet.emptySet(comparator); in RegularImmutableSortedMultiset()
54 RegularImmutableSortedSet<E> elementSet, long[] cumulativeCounts, int offset, int length) { in RegularImmutableSortedMultiset() argument
55 this.elementSet = elementSet; in RegularImmutableSortedMultiset()
67 return Multisets.immutableEntry(elementSet.asList().get(index), getCount(index)); in getEntry()
74 action.accept(elementSet.asList().get(i), getCount(i)); in forEachEntry()
90 int index = elementSet.indexOf(element); in count()
101 public ImmutableSortedSet<E> elementSet() { in elementSet() method in RegularImmutableSortedMultiset
102 return elementSet; in elementSet()
107 return getSubMultiset(0, elementSet.headIndex(upperBound, checkNotNull(boundType) == CLOSED)); in headMultiset()
[all …]
DRegularImmutableMultiset.java123 @LazyInit private transient ImmutableSet<E> elementSet; field in RegularImmutableMultiset
130 ImmutableSet<E> elementSet) { in RegularImmutableMultiset() argument
135 this.elementSet = elementSet; in RegularImmutableMultiset()
181 public ImmutableSet<E> elementSet() { in elementSet() method in RegularImmutableMultiset
182 ImmutableSet<E> result = elementSet; in elementSet()
183 return (result == null) ? elementSet = new ElementSet<E>(Arrays.asList(entries), this) : result; in elementSet()
DJdkBackedImmutableMultiset.java68 private transient ImmutableSet<E> elementSet; field in JdkBackedImmutableMultiset
71 public ImmutableSet<E> elementSet() { in elementSet() method in JdkBackedImmutableMultiset
72 ImmutableSet<E> result = elementSet; in elementSet()
73 return (result == null) ? elementSet = new ElementSet<E>(entries, this) : result; in elementSet()
DMultisets.java135 transient @Nullable Set<E> elementSet; field in UnmodifiableMultiset
138 return Collections.<E>unmodifiableSet(delegate.elementSet()); in createElementSet()
142 public Set<E> elementSet() { in elementSet() method in UnmodifiableMultiset
143 Set<E> es = elementSet; in elementSet()
144 return (es == null) ? elementSet = createElementSet() : es; in elementSet()
327 return Sets.filter(unfiltered.elementSet(), predicate); in createElementSet()
388 return ((Multiset<?>) elements).elementSet().size();
429 return Sets.union(multiset1.elementSet(), multiset2.elementSet());
491 return Sets.intersection(multiset1.elementSet(), multiset2.elementSet());
563 return Sets.union(multiset1.elementSet(), multiset2.elementSet());
[all …]
DDescendingMultiset.java48 private transient @Nullable NavigableSet<E> elementSet; field in DescendingMultiset
51 public NavigableSet<E> elementSet() { in elementSet() method in DescendingMultiset
52 NavigableSet<E> result = elementSet; in elementSet()
54 return elementSet = new SortedMultisets.NavigableElementSet<E>(this); in elementSet()
DAbstractMultiset.java127 @LazyInit private transient @Nullable Set<E> elementSet; field in AbstractMultiset
130 public Set<E> elementSet() { in elementSet() method in AbstractMultiset
131 Set<E> result = elementSet; in elementSet()
133 elementSet = result = createElementSet(); in elementSet()
DUnmodifiableSortedMultiset.java51 return Sets.unmodifiableNavigableSet(delegate().elementSet()); in createElementSet()
55 public NavigableSet<E> elementSet() { in elementSet() method in UnmodifiableSortedMultiset
56 return (NavigableSet<E>) super.elementSet(); in elementSet()
/external/guava/android/guava/src/com/google/common/collect/
DRegularImmutableSortedMultiset.java40 @VisibleForTesting final transient RegularImmutableSortedSet<E> elementSet; field in RegularImmutableSortedMultiset
46 this.elementSet = ImmutableSortedSet.emptySet(comparator); in RegularImmutableSortedMultiset()
53 RegularImmutableSortedSet<E> elementSet, long[] cumulativeCounts, int offset, int length) { in RegularImmutableSortedMultiset() argument
54 this.elementSet = elementSet; in RegularImmutableSortedMultiset()
66 return Multisets.immutableEntry(elementSet.asList().get(index), getCount(index)); in getEntry()
81 int index = elementSet.indexOf(element); in count()
92 public ImmutableSortedSet<E> elementSet() { in elementSet() method in RegularImmutableSortedMultiset
93 return elementSet; in elementSet()
98 return getSubMultiset(0, elementSet.headIndex(upperBound, checkNotNull(boundType) == CLOSED)); in headMultiset()
104 elementSet.tailIndex(lowerBound, checkNotNull(boundType) == CLOSED), length); in tailMultiset()
[all …]
DMultisets.java103 @NullableDecl transient Set<E> elementSet; field in Multisets.UnmodifiableMultiset
106 return Collections.<E>unmodifiableSet(delegate.elementSet()); in createElementSet()
110 public Set<E> elementSet() { in elementSet() method in Multisets.UnmodifiableMultiset
111 Set<E> es = elementSet; in elementSet()
112 return (es == null) ? elementSet = createElementSet() : es; in elementSet()
296 return Sets.filter(unfiltered.elementSet(), predicate); in createElementSet()
357 return ((Multiset<?>) elements).elementSet().size();
398 return Sets.union(multiset1.elementSet(), multiset2.elementSet());
460 return Sets.intersection(multiset1.elementSet(), multiset2.elementSet());
532 return Sets.union(multiset1.elementSet(), multiset2.elementSet());
[all …]
DRegularImmutableMultiset.java41 @LazyInit private transient ImmutableSet<E> elementSet; field in RegularImmutableMultiset
68 public ImmutableSet<E> elementSet() { in elementSet() method in RegularImmutableMultiset
69 ImmutableSet<E> result = elementSet; in elementSet()
70 return (result == null) ? elementSet = new ElementSet() : result; in elementSet()
DDescendingMultiset.java48 @NullableDecl private transient NavigableSet<E> elementSet; field in DescendingMultiset
51 public NavigableSet<E> elementSet() { in elementSet() method in DescendingMultiset
52 NavigableSet<E> result = elementSet; in elementSet()
54 return elementSet = new SortedMultisets.NavigableElementSet<E>(this); in elementSet()
DAbstractMultiset.java127 @LazyInit @NullableDecl private transient Set<E> elementSet; field in AbstractMultiset
130 public Set<E> elementSet() { in elementSet() method in AbstractMultiset
131 Set<E> result = elementSet; in elementSet()
133 elementSet = result = createElementSet(); in elementSet()
DUnmodifiableSortedMultiset.java51 return Sets.unmodifiableNavigableSet(delegate().elementSet()); in createElementSet()
55 public NavigableSet<E> elementSet() { in elementSet() method in UnmodifiableSortedMultiset
56 return (NavigableSet<E>) super.elementSet(); in elementSet()
/external/exoplayer/tree/library/common/src/test/java/com/google/android/exoplayer2/util/
DCopyOnWriteMultisetTest.java45 assertThat(multiset.elementSet()).containsExactly("a string", "different string"); in multipleEqualObjectsCountedAsExpected()
63 assertThat(multiset.elementSet()).containsExactly("a string", "different string"); in removingObjectDecrementsCount()
81 assertThat(multiset.elementSet()).containsExactly("a string"); in removingLastObjectRemovesCompletely()
106 Set<String> elementSet = multiset.elementSet(); in modifyingElementSetFails() local
108 assertThrows(UnsupportedOperationException.class, () -> elementSet.remove("a string")); in modifyingElementSetFails()
/external/guava/guava-gwt/src-super/com/google/common/collect/super/com/google/common/collect/
DDescendingMultiset.java46 private transient SortedSet<E> elementSet; field in DescendingMultiset
49 public SortedSet<E> elementSet() { in elementSet() method in DescendingMultiset
50 SortedSet<E> result = elementSet; in elementSet()
52 return elementSet = new SortedMultisets.ElementSet<E>(this); in elementSet()
DUnmodifiableSortedMultiset.java47 return Collections.unmodifiableSortedSet(delegate().elementSet()); in createElementSet()
51 public SortedSet<E> elementSet() { in elementSet() method in UnmodifiableSortedMultiset
52 return (SortedSet<E>) super.elementSet(); in elementSet()

1234