Search Options

Results per page
Sort
Preferred Languages
Advance

Results 41 - 50 of 370 for Sets (0.14 sec)

  1. android/guava-testlib/test/com/google/common/testing/EqualsTesterTest.java

     */
    
    package com.google.common.testing;
    
    import com.google.common.annotations.GwtCompatible;
    import com.google.common.base.Preconditions;
    import com.google.common.collect.ImmutableList;
    import com.google.common.collect.Sets;
    import java.util.Set;
    import junit.framework.AssertionFailedError;
    import junit.framework.TestCase;
    import org.checkerframework.checker.nullness.qual.Nullable;
    
    /**
     * Unit tests for {@link EqualsTester}.
     *
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Apr 17 15:49:06 GMT 2023
    - 12.9K bytes
    - Viewed (0)
  2. guava-tests/benchmark/com/google/common/collect/MultipleSetContainsBenchmark.java

          double setSize = rng.nextDouble();
          if (setSize < emptySetProportion) {
            sets[i] = ImmutableSet.of();
          } else if (setSize < emptySetProportion + singletonSetProportion) {
            sets[i] = ImmutableSet.of(PRESENT);
          } else {
            sets[i] = ImmutableSet.of(PRESENT, new Object());
          }
    
          if (rng.nextDouble() < hitRate) {
            queries[i] = PRESENT;
          } else {
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Thu Feb 22 20:09:59 GMT 2024
    - 2.3K bytes
    - Viewed (0)
  3. android/guava-testlib/src/com/google/common/collect/testing/google/SetMultimapAsMapTester.java

            Helpers.mapEntry(k0(), v0()), Helpers.mapEntry(k1(), v0()), Helpers.mapEntry(k0(), v3()));
        Set<Entry<K, Collection<V>>> expected = Sets.newHashSet();
        expected.add(Helpers.mapEntry(k0(), (Collection<V>) Sets.newHashSet(v0(), v3())));
        expected.add(Helpers.mapEntry(k1(), (Collection<V>) Sets.newHashSet(v0())));
        new EqualsTester().addEqualityGroup(expected, multimap().asMap().entrySet()).testEquals();
      }
    
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Feb 21 16:49:06 GMT 2024
    - 3.9K bytes
    - Viewed (0)
  4. guava-testlib/src/com/google/common/collect/testing/google/SetGenerators.java

    import java.util.Arrays;
    import java.util.Collections;
    import java.util.Comparator;
    import java.util.List;
    import java.util.Set;
    import java.util.SortedSet;
    
    /**
     * Generators of different types of sets and derived collections from sets.
     *
     * @author Kevin Bourrillion
     * @author Jared Levy
     * @author Hayward Chan
     */
    @GwtCompatible(emulated = true)
    @ElementTypesAreNonnullByDefault
    public class SetGenerators {
    
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Feb 21 16:49:06 GMT 2024
    - 15.5K bytes
    - Viewed (0)
  5. android/guava-testlib/src/com/google/common/collect/testing/SetTestSuiteBuilder.java

        testers.add(SetCreationTester.class);
        testers.add(SetHashCodeTester.class);
        testers.add(SetEqualsTester.class);
        testers.add(SetRemoveTester.class);
        // SetRemoveAllTester doesn't exist because, Sets not permitting
        // duplicate elements, there are no tests for Set.removeAll() that aren't
        // covered by CollectionRemoveAllTester.
        return testers;
      }
    
      @Override
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Feb 26 19:46:10 GMT 2024
    - 4.6K bytes
    - Viewed (0)
  6. android/guava/src/com/google/common/cache/ReferenceEntry.java

      @SuppressWarnings("GoodTime")
      long getAccessTime();
    
      /** Sets the entry access time in ns. */
      @SuppressWarnings("GoodTime") // b/122668874
      void setAccessTime(long time);
    
      /** Returns the next entry in the access queue. */
      ReferenceEntry<K, V> getNextInAccessQueue();
    
      /** Sets the next entry in the access queue. */
      void setNextInAccessQueue(ReferenceEntry<K, V> next);
    
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Tue Jun 15 18:00:07 GMT 2021
    - 3.5K bytes
    - Viewed (0)
  7. guava-tests/test/com/google/common/collect/ImmutableSortedSetTest.java

        SortedSet<String> set = of("a", "b", "c");
        assertEquals(set, Sets.newTreeSet(asList("a", "b", "c")));
        assertEquals(Sets.newTreeSet(asList("a", "b", "c")), set);
        assertFalse(set.equals(Sets.newTreeSet(asList("a", "b", "d"))));
        assertFalse(Sets.newTreeSet(asList("a", "b", "d")).equals(set));
        assertFalse(set.equals(Sets.newHashSet(4, 5, 6)));
        assertFalse(Sets.newHashSet(4, 5, 6).equals(set));
      }
    
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Thu Mar 07 18:34:03 GMT 2024
    - 46.1K bytes
    - Viewed (0)
  8. guava-tests/test/com/google/common/graph/NetworkEquivalenceTest.java

        assertThat(network).isNotEqualTo(g2);
      }
    
      // Node sets are the same, but edge sets differ.
      @Test
      public void equivalent_edgeSetsDiffer() {
        network.addEdge(N1, N2, E12);
    
        MutableNetwork<Integer, String> g2 = createNetwork(edgeType);
        g2.addEdge(N1, N2, E13);
    
        assertThat(network).isNotEqualTo(g2);
      }
    
      // Node/edge sets are the same, but node/edge connections differ due to edge type.
      @Test
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Thu Jun 22 19:09:27 GMT 2017
    - 5.9K bytes
    - Viewed (0)
  9. guava/src/com/google/common/base/SmallCharMatcher.java

    import com.google.common.annotations.VisibleForTesting;
    import com.google.common.base.CharMatcher.NamedFastMatcher;
    import java.util.BitSet;
    
    /**
     * An immutable version of CharMatcher for smallish sets of characters that uses a hash table with
     * linear probing to check for matches.
     *
     * @author Christopher Swenson
     */
    @GwtIncompatible // no precomputation is done in GWT
    @ElementTypesAreNonnullByDefault
    Java
    - Registered: Fri Apr 05 12:43:09 GMT 2024
    - Last Modified: Fri Feb 09 15:49:48 GMT 2024
    - 4.5K bytes
    - Viewed (0)
  10. android/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).
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Feb 26 16:35:21 GMT 2024
    - 5.8K bytes
    - Viewed (0)
Back to top