- Sort Score
- Result 10 results
- Languages All
Results 61 - 70 of 167 for multiset (0.09 sec)
-
guava/src/com/google/common/collect/LinkedHashMultiset.java
* * @param elements the elements that the multiset should contain */ public static <E extends @Nullable Object> LinkedHashMultiset<E> create( Iterable<? extends E> elements) { LinkedHashMultiset<E> multiset = create(Multisets.inferDistinctElements(elements)); Iterables.addAll(multiset, elements); return multiset; } private LinkedHashMultiset() {
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Mon Apr 01 16:15:01 UTC 2024 - 4K bytes - Viewed (0) -
guava-tests/test/com/google/common/collect/EnumMultisetTest.java
FEMALE } public void testClassCreate() { Multiset<Color> ms = EnumMultiset.create(Color.class); ms.add(Color.RED); ms.add(Color.YELLOW); ms.add(Color.RED); assertEquals(0, ms.count(Color.BLUE)); assertEquals(1, ms.count(Color.YELLOW)); assertEquals(2, ms.count(Color.RED)); } public void testCollectionCreate() {
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Tue Oct 15 17:36:06 UTC 2024 - 5.9K bytes - Viewed (0) -
guava/src/com/google/common/collect/Serialization.java
Multiset<E> multiset, ObjectOutputStream stream) throws IOException { int entryCount = multiset.entrySet().size(); stream.writeInt(entryCount); for (Multiset.Entry<E> entry : multiset.entrySet()) { stream.writeObject(entry.getElement()); stream.writeInt(entry.getCount()); } } /**
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Mon Mar 06 16:06:58 UTC 2023 - 8.5K bytes - Viewed (0) -
guava-testlib/src/com/google/common/collect/testing/google/AbstractMultisetTester.java
*/ package com.google.common.collect.testing.google; import com.google.common.annotations.GwtCompatible; import com.google.common.collect.Multiset; import com.google.common.collect.testing.AbstractCollectionTester; import org.junit.Ignore; /** * Base class for multiset collection tests. * * @author Jared Levy */ @GwtCompatible
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Jul 24 20:12:35 UTC 2024 - 1.3K bytes - Viewed (0) -
guava-tests/test/com/google/common/collect/ConcurrentHashMultisetTest.java
multiset.add(s1); multiset.add(s2, 3); assertEquals(2, multiset.count(s1)); assertEquals(3, multiset.count(s2)); multiset.remove(s1); assertEquals(1, multiset.count(s1)); assertEquals(3, multiset.count(s2)); } public void testLogicalKeyEquality_strongKeys() { testLogicalKeyEquality(STRONG); } public void testLogicalKeyEquality_weakKeys() {
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Sep 06 17:04:31 UTC 2023 - 14.2K bytes - Viewed (0) -
android/guava/src/com/google/common/collect/ForwardingMultiset.java
*/ protected class StandardElementSet extends Multisets.ElementSet<E> { /** Constructor for use by subclasses. */ public StandardElementSet() {} @Override Multiset<E> multiset() { return ForwardingMultiset.this; } @Override public Iterator<E> iterator() { return Multisets.elementIterator(multiset().entrySet().iterator()); } } /**
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri May 12 15:26:39 UTC 2023 - 10.4K bytes - Viewed (0) -
android/guava-testlib/src/com/google/common/collect/testing/google/TestMultisetGenerator.java
package com.google.common.collect.testing.google; import com.google.common.annotations.GwtCompatible; import com.google.common.collect.Multiset; import com.google.common.collect.testing.TestCollectionGenerator; import org.checkerframework.checker.nullness.qual.Nullable; /** * Creates multisets, containing sample elements, to be tested. * * @author Jared Levy */ @GwtCompatible @ElementTypesAreNonnullByDefault
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Feb 21 16:49:06 UTC 2024 - 1.2K bytes - Viewed (0) -
guava-tests/benchmark/com/google/common/collect/HashMultisetAddPresentBenchmark.java
private static final int ARRAY_SIZE = 0x10000; List<Multiset<Integer>> multisets = new ArrayList<>(0x10000); int[] queries = new int[ARRAY_SIZE]; @BeforeExperiment void setUp() { Random random = new Random(); multisets.clear(); for (int i = 0; i < ARRAY_SIZE; i++) { HashMultiset<Integer> multiset = HashMultiset.<Integer>create(); multisets.add(multiset); queries[i] = random.nextInt();
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Mon Dec 04 17:37:03 UTC 2017 - 1.6K bytes - Viewed (0) -
guava-tests/test/com/google/common/collect/LinkedHashMultisetTest.java
}; } public void testCreate() { Multiset<String> multiset = LinkedHashMultiset.create(); multiset.add("foo", 2); multiset.add("bar"); assertEquals(3, multiset.size()); assertEquals(2, multiset.count("foo")); assertEquals("[foo x 2, bar]", multiset.toString()); } public void testCreateWithSize() { Multiset<String> multiset = LinkedHashMultiset.create(50); multiset.add("foo", 2);
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Sat Oct 19 00:05:46 UTC 2024 - 4.5K bytes - Viewed (0) -
guava-testlib/src/com/google/common/collect/testing/google/MultimapKeysTester.java
} @CollectionSize.Require(ONE) @CollectionFeature.Require(SUPPORTS_ITERATOR_REMOVE) public void testKeysEntrySetIteratorRemove() { Multiset<K> keys = multimap().keys(); Iterator<Multiset.Entry<K>> itr = keys.entrySet().iterator(); assertEquals(Multisets.immutableEntry(k0(), 1), itr.next()); itr.remove(); assertTrue(multimap().isEmpty()); } @CollectionSize.Require(SEVERAL)
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 30 16:15:19 UTC 2024 - 4.2K bytes - Viewed (0)