Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 943 for set (0.3 sec)

  1. guava-tests/test/com/google/common/collect/ImmutableSortedSetTest.java

      }
    
      public void testEmpty_comparator() {
        SortedSet<String> set = of();
        assertSame(Ordering.natural(), set.comparator());
      }
    
      public void testEmpty_headSet() {
        SortedSet<String> set = of();
        assertSame(set, set.headSet("c"));
      }
    
      public void testEmpty_tailSet() {
        SortedSet<String> set = of();
        assertSame(set, set.tailSet("f"));
      }
    
      public void testEmpty_subSet() {
    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)
  2. android/guava-tests/test/com/google/common/collect/SetOperationsTest.java

                      @Override
                      protected Set<String> create(String[] elements) {
                        Set<String> set = Sets.newHashSet("b", "c");
                        Set<String> other = Sets.newHashSet("a", "b", "c", "d");
                        return Sets.difference(set, other);
                      }
                    })
                .named("set - superset")
                .withFeatures(
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Feb 19 20:34:55 GMT 2024
    - 14.7K bytes
    - Viewed (0)
  3. android/guava-testlib/src/com/google/common/collect/testing/testers/ListSetTester.java

            initialValue,
            getList().set(index, newValue));
        assertEquals("After set(i, x), get(i) should return x", newValue, getList().get(index));
        assertEquals("set() should not change the size of a list.", getNumElements(), getList().size());
      }
    
      @ListFeature.Require(SUPPORTS_SET)
      public void testSet_indexTooLow() {
        try {
          getList().set(-1, e3());
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Feb 21 16:49:06 GMT 2024
    - 5.3K bytes
    - Viewed (0)
  4. guava-testlib/src/com/google/common/collect/testing/features/FeatureUtil.java

          }
        }
        return features;
      }
    
      /**
       * Given a set of features, return a new set of all features directly or indirectly implied by any
       * of them.
       *
       * @param features the set of features whose implications to find
       * @return the implied set of features
       */
      public static Set<Feature<?>> impliedFeatures(Set<Feature<?>> features) {
        Set<Feature<?>> impliedSet = new LinkedHashSet<>();
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Sep 21 15:08:35 GMT 2022
    - 12.1K bytes
    - Viewed (0)
  5. guava-testlib/src/com/google/common/collect/testing/testers/SetEqualsTester.java

        assertTrue(
            "A Set should equal any other Set containing the same elements,"
                + " even if some elements are null.",
            getSet().equals(MinimalSet.from(elements)));
      }
    
      @CollectionSize.Require(absent = CollectionSize.ZERO)
      public void testEquals_otherContainsNull() {
        Collection<E> elements = getSampleElements(getNumElements() - 1);
        elements.add(null);
        Set<E> other = MinimalSet.from(elements);
    
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Tue Jan 09 20:10:38 GMT 2018
    - 3.5K bytes
    - Viewed (0)
  6. android/guava-tests/test/com/google/common/collect/IterablesTest.java

      }
    
      public void testFrequency_set() {
        Set<String> set = Sets.newHashSet("a", "b", "c");
        assertEquals(1, Iterables.frequency(set, "a"));
        assertEquals(1, Iterables.frequency(set, "b"));
        assertEquals(1, Iterables.frequency(set, "c"));
        assertEquals(0, Iterables.frequency(set, "d"));
        assertEquals(0, Iterables.frequency(set, 4.2));
        assertEquals(0, Iterables.frequency(set, null));
      }
    
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Thu Mar 07 18:34:03 GMT 2024
    - 46K bytes
    - Viewed (0)
  7. android/guava-testlib/src/com/google/common/collect/testing/features/SetFeature.java

    import java.util.Set;
    
    /**
     * Optional features of classes derived from {@code Set}.
     *
     * @author George van den Driessche
     */
    @SuppressWarnings("rawtypes") // maybe avoidable if we rework the whole package?
    @GwtCompatible
    public enum SetFeature implements Feature<Set> {
      GENERAL_PURPOSE(CollectionFeature.GENERAL_PURPOSE);
    
      private final Set<Feature<? super Set>> implied;
    
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Feb 26 19:46:10 GMT 2024
    - 1.6K bytes
    - Viewed (0)
  8. guava-tests/test/com/google/common/collect/CollectionBenchmarkSampleData.java

          }
        }
        Collections.shuffle(queryList, random);
        return queryList.toArray(new Element[0]);
      }
    
      private Set<Element> createData() {
        Set<Element> set = Sets.newHashSetWithExpectedSize(size);
        while (set.size() < size) {
          set.add(newElement());
        }
        return set;
      }
    
      private Element newElement() {
        int value = random.nextInt();
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Mon Apr 17 15:49:06 GMT 2023
    - 4.2K bytes
    - Viewed (0)
  9. android/guava/src/com/google/common/collect/CompactLinkedHashSet.java

       *
       * @param collection the elements that the set should contain
       * @return a new {@code CompactLinkedHashSet} containing those elements (minus duplicates)
       */
      public static <E extends @Nullable Object> CompactLinkedHashSet<E> create(
          Collection<? extends E> collection) {
        CompactLinkedHashSet<E> set = createWithExpectedSize(collection.size());
        set.addAll(collection);
        return set;
      }
    
      /**
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Feb 05 21:38:59 GMT 2024
    - 9.5K bytes
    - Viewed (0)
  10. android/guava-tests/test/com/google/common/collect/SynchronizedSetTest.java

                  @Override
                  protected Set<String> create(String[] elements) {
                    TestSet<String> inner = new TestSet<>(new HashSet<String>(), MUTEX);
                    Set<String> outer = Synchronized.set(inner, inner.mutex);
                    Collections.addAll(outer, elements);
                    return outer;
                  }
                })
            .named("Synchronized.set")
            .withFeatures(
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Apr 17 11:19:47 GMT 2023
    - 4.8K bytes
    - Viewed (0)
Back to top