Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 25 for getOrderedElements (0.33 sec)

  1. guava-testlib/src/com/google/common/collect/testing/testers/AbstractListIndexOfTester.java

      protected abstract String getMethodName();
    
      @CollectionSize.Require(absent = ZERO)
      public void testFind_yes() {
        assertEquals(
            getMethodName() + "(firstElement) should return 0", 0, find(getOrderedElements().get(0)));
      }
    
      public void testFind_no() {
        assertEquals(getMethodName() + "(notPresent) should return -1", -1, find(e3()));
      }
    
      @CollectionFeature.Require(ALLOWS_NULL_VALUES)
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Thu Apr 20 11:19:03 GMT 2023
    - 3.2K bytes
    - Viewed (0)
  2. guava-testlib/src/com/google/common/collect/testing/testers/CollectionStreamTester.java

        }
      }
    
      @CollectionFeature.Require(KNOWN_ORDER)
      public void testStreamToArrayKnownOrder() {
        synchronized (collection) { // to allow Collections.synchronized* tests to pass
          assertEquals(getOrderedElements(), Arrays.asList(collection.stream().toArray()));
        }
      }
    
      public void testStreamCount() {
        synchronized (collection) { // to allow Collections.synchronized* tests to pass
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Jan 09 20:10:38 GMT 2018
    - 2.3K bytes
    - Viewed (0)
  3. guava-testlib/src/com/google/common/collect/testing/testers/MapReplaceAllTester.java

            .replaceAll(
                (K k, V v) -> {
                  int index = keys().asList().indexOf(k);
                  return values().asList().get(index + 1);
                });
        List<Entry<K, V>> orderedEntries = getOrderedElements();
        int index = 0;
        for (K key : getMap().keySet()) {
          assertEquals(orderedEntries.get(index).getKey(), key);
          index++;
        }
      }
    
      @MapFeature.Require(absent = SUPPORTS_PUT)
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Fri Oct 01 17:18:04 GMT 2021
    - 4.3K bytes
    - Viewed (0)
  4. guava-testlib/src/com/google/common/collect/testing/testers/CollectionToStringTester.java

      }
    
      @CollectionSize.Require(SEVERAL)
      @CollectionFeature.Require(value = KNOWN_ORDER, absent = NON_STANDARD_TOSTRING)
      public void testToString_sizeSeveral() {
        String expected = Helpers.copyToList(getOrderedElements()).toString();
        assertEquals("collection.toString() incorrect", expected, collection.toString());
      }
    
      @CollectionSize.Require(absent = ZERO)
      @CollectionFeature.Require(ALLOWS_NULL_VALUES)
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Jan 09 20:10:38 GMT 2018
    - 3K bytes
    - Viewed (0)
  5. guava-testlib/src/com/google/common/collect/testing/testers/ListEqualsTester.java

      public void testEquals_otherListWithSameElements() {
        assertTrue(
            "A List should equal any other List containing the same elements.",
            getList().equals(new ArrayList<E>(getOrderedElements())));
      }
    
      @CollectionSize.Require(absent = CollectionSize.ZERO)
      public void testEquals_otherListWithDifferentElements() {
        ArrayList<E> other = new ArrayList<>(getSampleElements());
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Jan 09 20:10:38 GMT 2018
    - 3.5K bytes
    - Viewed (0)
  6. android/guava-testlib/src/com/google/common/collect/testing/testers/ListEqualsTester.java

      public void testEquals_otherListWithSameElements() {
        assertTrue(
            "A List should equal any other List containing the same elements.",
            getList().equals(new ArrayList<E>(getOrderedElements())));
      }
    
      @CollectionSize.Require(absent = CollectionSize.ZERO)
      public void testEquals_otherListWithDifferentElements() {
        ArrayList<E> other = new ArrayList<>(getSampleElements());
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Tue Jan 09 20:10:38 GMT 2018
    - 3.5K bytes
    - Viewed (0)
  7. guava-testlib/src/com/google/common/collect/testing/testers/ListHashCodeTester.java

    public class ListHashCodeTester<E> extends AbstractListTester<E> {
      public void testHashCode() {
        int expectedHashCode = 1;
        for (E element : getOrderedElements()) {
          expectedHashCode = 31 * expectedHashCode + ((element == null) ? 0 : element.hashCode());
        }
        assertEquals(
            "A List's hashCode() should be computed from those of its elements.",
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Feb 21 16:49:06 GMT 2024
    - 1.9K bytes
    - Viewed (0)
  8. android/guava-testlib/src/com/google/common/collect/testing/testers/ListHashCodeTester.java

    public class ListHashCodeTester<E> extends AbstractListTester<E> {
      public void testHashCode() {
        int expectedHashCode = 1;
        for (E element : getOrderedElements()) {
          expectedHashCode = 31 * expectedHashCode + ((element == null) ? 0 : element.hashCode());
        }
        assertEquals(
            "A List's hashCode() should be computed from those of its elements.",
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Feb 21 16:49:06 GMT 2024
    - 1.9K bytes
    - Viewed (0)
  9. guava-testlib/src/com/google/common/collect/testing/testers/CollectionForEachTester.java

      }
    
      @CollectionFeature.Require(KNOWN_ORDER)
      public void testForEachKnownOrder() {
        List<E> elements = new ArrayList<>();
        collection.forEach(elements::add);
        List<E> expected = Helpers.copyToList(getOrderedElements());
        assertEquals("Different ordered iteration", expected, elements);
      }
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Fri Oct 01 17:18:04 GMT 2021
    - 2K bytes
    - Viewed (0)
  10. guava-testlib/src/com/google/common/collect/testing/testers/CollectionSpliteratorTester.java

        }
      }
    
      @CollectionFeature.Require(KNOWN_ORDER)
      public void testSpliteratorKnownOrder() {
        synchronized (collection) {
          SpliteratorTester.of(collection::spliterator).expect(getOrderedElements()).inOrder();
        }
      }
    
      @CollectionFeature.Require(ALLOWS_NULL_VALUES)
      @CollectionSize.Require(absent = ZERO)
      public void testSpliteratorNullable() {
        initCollectionWithNullElement();
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Feb 21 16:49:06 GMT 2024
    - 4K bytes
    - Viewed (0)
Back to top