Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 42 for getSampleElements (0.09 sec)

  1. android/guava-testlib/src/com/google/common/collect/testing/AbstractContainerTester.java

      }
    
      protected Collection<E> getSampleElements(int howMany) {
        return getSubjectGenerator().getSampleElements(howMany);
      }
    
      protected Collection<E> getSampleElements() {
        return getSampleElements(getNumElements());
      }
    
      /**
       * Returns the {@linkplain #getSampleElements() sample elements} as ordered by {@link
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 8.8K bytes
    - Viewed (0)
  2. guava-testlib/src/com/google/common/collect/testing/OneSizeGenerator.java

        return generator.createArray(length);
      }
    
      @Override
      public T createTestSubject() {
        Collection<E> elements = getSampleElements(getCollectionSize().getNumElements());
        return generator.create(elements.toArray());
      }
    
      @Override
      public Collection<E> getSampleElements(int howMany) {
        SampleElements<E> samples = samples();
        List<E> allSampleElements =
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:05:46 UTC 2024
    - 2.5K bytes
    - Viewed (0)
  3. guava-testlib/src/com/google/common/collect/testing/testers/SortedMapNavigationTester.java

      public void setUp() throws Exception {
        super.setUp();
        navigableMap = (SortedMap<K, V>) getMap();
        List<Entry<K, V>> entries =
            copyToList(
                getSubjectGenerator()
                    .getSampleElements(getSubjectGenerator().getCollectionSize().getNumElements()));
        sort(entries, Helpers.<K, V>entryComparator(navigableMap.comparator()));
    
        // some tests assume SEVERAL == 3
        if (entries.size() >= 1) {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 6.1K bytes
    - Viewed (0)
  4. android/guava-testlib/src/com/google/common/collect/testing/google/MultisetEqualsTester.java

    public class MultisetEqualsTester<E> extends AbstractMultisetTester<E> {
      public void testEqualsSameContents() {
        new EqualsTester()
            .addEqualityGroup(
                getMultiset(), getSubjectGenerator().create(getSampleElements().toArray()))
            .testEquals();
      }
    
      @CollectionSize.Require(absent = ZERO)
      public void testNotEqualsEmpty() {
        new EqualsTester()
            .addEqualityGroup(getMultiset())
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Jul 24 20:12:35 UTC 2024
    - 2.3K bytes
    - Viewed (0)
  5. guava-testlib/src/com/google/common/collect/testing/google/MultimapForEachTester.java

        assertEqualIgnoringOrder(getSampleElements(), multimap().entries());
      }
    
      @CollectionFeature.Require(KNOWN_ORDER)
      public void testForEachOrder() {
        List<Entry<K, V>> entries = new ArrayList<>();
        multimap().forEach((k, v) -> entries.add(mapEntry(k, v)));
        assertEqualIgnoringOrder(getSampleElements(), multimap().entries());
      }
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Jul 24 20:12:35 UTC 2024
    - 1.9K bytes
    - Viewed (0)
  6. guava-testlib/src/com/google/common/collect/testing/AbstractMapTester.java

      protected int getNumEntries() {
        return getNumElements();
      }
    
      protected Collection<Entry<K, V>> getSampleEntries(int howMany) {
        return getSampleElements(howMany);
      }
    
      protected Collection<Entry<K, V>> getSampleEntries() {
        return getSampleElements();
      }
    
      @Override
      protected void expectMissing(Entry<K, V>... entries) {
        for (Entry<K, V> entry : entries) {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 7.6K bytes
    - Viewed (0)
  7. android/guava-testlib/src/com/google/common/collect/testing/OneSizeGenerator.java

        return generator.createArray(length);
      }
    
      @Override
      public T createTestSubject() {
        Collection<E> elements = getSampleElements(getCollectionSize().getNumElements());
        return generator.create(elements.toArray());
      }
    
      @Override
      public Collection<E> getSampleElements(int howMany) {
        SampleElements<E> samples = samples();
        List<E> allSampleElements =
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:05:46 UTC 2024
    - 2.5K bytes
    - Viewed (0)
  8. android/guava-testlib/src/com/google/common/collect/testing/testers/CollectionIteratorTester.java

        runIteratorTest(MODIFIABLE, IteratorTester.KnownOrder.UNKNOWN_ORDER, getSampleElements());
      }
    
      @CollectionFeature.Require(absent = {KNOWN_ORDER, SUPPORTS_ITERATOR_REMOVE})
      public void testIterator_unknownOrderRemoveUnsupported() {
        runIteratorTest(UNMODIFIABLE, IteratorTester.KnownOrder.UNKNOWN_ORDER, getSampleElements());
      }
    
      private void runIteratorTest(
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 6K bytes
    - Viewed (0)
  9. android/guava-testlib/src/com/google/common/collect/testing/OneSizeTestContainerGenerator.java

    public interface OneSizeTestContainerGenerator<T, E extends @Nullable Object>
        extends TestSubjectGenerator<T>, TestContainerGenerator<T, E> {
      TestContainerGenerator<T, E> getInnerGenerator();
    
      Collection<E> getSampleElements(int howMany);
    
      CollectionSize getCollectionSize();
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Feb 21 16:49:06 UTC 2024
    - 1.5K bytes
    - Viewed (0)
  10. android/guava-testlib/src/com/google/common/collect/testing/testers/SetHashCodeTester.java

    @SuppressWarnings("JUnit4ClassUsedInJUnit3")
    public class SetHashCodeTester<E> extends AbstractSetTester<E> {
      public void testHashCode() {
        int expectedHashCode = 0;
        for (E element : getSampleElements()) {
          expectedHashCode += ((element == null) ? 0 : element.hashCode());
        }
        assertEquals(
            "A Set's hashCode() should be the sum of those of its elements.",
            expectedHashCode,
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 3K bytes
    - Viewed (0)
Back to top