- Sort Score
- Result 10 results
- Languages All
Results 1 - 9 of 9 for newIdentityHashSet (0.16 sec)
-
guava-tests/test/com/google/common/collect/EnumMultisetTest.java
public void testEntrySet() { Multiset<Color> ms = EnumMultiset.create(Color.class); ms.add(Color.BLUE, 3); ms.add(Color.YELLOW, 1); ms.add(Color.RED, 2); Set<Object> uniqueEntries = Sets.newIdentityHashSet(); uniqueEntries.addAll(ms.entrySet()); assertEquals(3, uniqueEntries.size()); } // Wrapper of EnumMultiset factory methods, because we need to skip create(Class).
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Tue Oct 15 17:36:06 UTC 2024 - 5.9K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/collect/EnumHashBiMapTest.java
Currency.PESO, "peso", Currency.FRANC, "franc"); EnumHashBiMap<Currency, String> bimap = EnumHashBiMap.create(map); Set<Object> uniqueEntries = Sets.newIdentityHashSet(); uniqueEntries.addAll(bimap.entrySet()); assertEquals(3, uniqueEntries.size()); } @J2ktIncompatible @GwtIncompatible // serialize public void testSerializable() {
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Sat Oct 19 00:05:46 UTC 2024 - 8.2K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/util/concurrent/StripedTest.java
for (Striped<?> striped : allImplementations()) { assertBasicInvariants(striped); } } private static void assertBasicInvariants(Striped<?> striped) { Set<Object> observed = Sets.newIdentityHashSet(); // for the sake of weakly referenced locks. // this gets the stripes with #getAt(index) for (int i = 0; i < striped.size(); i++) { Object object = striped.getAt(i); assertNotNull(object);
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Jun 26 12:58:35 UTC 2024 - 8.4K bytes - Viewed (0) -
guava-tests/test/com/google/common/util/concurrent/StripedTest.java
for (Striped<?> striped : allImplementations()) { assertBasicInvariants(striped); } } private static void assertBasicInvariants(Striped<?> striped) { Set<Object> observed = Sets.newIdentityHashSet(); // for the sake of weakly referenced locks. // this gets the stripes with #getAt(index) for (int i = 0; i < striped.size(); i++) { Object object = striped.getAt(i); assertNotNull(object);
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Jun 26 12:58:35 UTC 2024 - 8.4K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/util/concurrent/AbstractFutureTest.java
} awaitUnchecked(barrier); return null; } }; final Set<Object> finalResults = Collections.synchronizedSet(Sets.newIdentityHashSet()); Runnable collectResultsRunnable = new Runnable() { @Override public void run() { try {
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Oct 18 22:10:29 UTC 2024 - 47.1K bytes - Viewed (0) -
guava-tests/test/com/google/common/collect/EnumBiMapTest.java
Currency.PESO, Country.CHILE, Currency.FRANC, Country.SWITZERLAND); EnumBiMap<Currency, Country> bimap = EnumBiMap.create(map); Set<Object> uniqueEntries = Sets.newIdentityHashSet(); uniqueEntries.addAll(bimap.entrySet()); assertEquals(3, uniqueEntries.size()); } @J2ktIncompatible @GwtIncompatible // serialization public void testSerializable() {
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 30 16:15:19 UTC 2024 - 11.8K bytes - Viewed (0) -
guava/src/com/google/common/util/concurrent/CycleDetectingLockFactory.java
return; } // Otherwise, it's the first time seeing this lock relationship. Look for // a path from the acquiredLock to this. Set<LockGraphNode> seen = Sets.newIdentityHashSet(); ExampleStackTrace path = acquiredLock.findPathTo(this, seen); if (path == null) { // this can be safely acquired after the acquiredLock. //
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Dec 15 19:31:54 UTC 2023 - 35.9K bytes - Viewed (0) -
guava-tests/test/com/google/common/collect/SetsTest.java
TreeSet<Integer> set = Sets.newTreeSet(SOME_COMPARATOR); verifySortedSetContents(set, EMPTY_COLLECTION, SOME_COMPARATOR); } public void testNewIdentityHashSet() { Set<Integer> set = Sets.newIdentityHashSet(); Integer value1 = new Integer(12357); Integer value2 = new Integer(12357); assertTrue(set.add(value1)); assertFalse(set.contains(value2)); assertTrue(set.contains(value1));
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 30 16:15:19 UTC 2024 - 48.6K bytes - Viewed (0) -
android/guava/src/com/google/common/collect/Sets.java
* way {@code IdentityHashMap} handles key lookups. * * @since 8.0 */ public static <E extends @Nullable Object> Set<E> newIdentityHashSet() { return Collections.newSetFromMap(Maps.<E, Boolean>newIdentityHashMap()); } /** * Creates an empty {@code CopyOnWriteArraySet} instance. *
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Mon Oct 21 14:28:19 UTC 2024 - 78.8K bytes - Viewed (0)