Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 393 for if (0.42 sec)

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

          assertEquals("index " + i, expected, actual);
          i++;
        }
        if (actualIterator.hasNext()) {
          fail("index " + i + ", expected is exhausted, actual <" + actualIterator.next() + ">");
        }
      }
    
      /**
       * Verifies that a collection is immutable.
       *
       * <p>A collection is considered immutable if:
       *
       * <ol>
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Feb 26 19:46:10 GMT 2024
    - 14.8K bytes
    - Viewed (0)
  2. guava-tests/test/com/google/common/collect/AbstractTableTest.java

        return true;
      }
    
      protected boolean supportsNullValues() {
        return false;
      }
    
      public void testClear() {
        table = create("foo", 1, 'a', "bar", 1, 'b', "foo", 3, 'c');
        if (supportsRemove()) {
          table.clear();
          assertEquals(0, table.size());
          assertFalse(table.containsRow("foo"));
        } else {
          try {
            table.clear();
            fail();
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Mon Mar 04 16:54:11 GMT 2024
    - 6K bytes
    - Viewed (0)
  3. guava/src/com/google/common/collect/ForwardingMapEntry.java

       * A sensible definition of {@link #equals(Object)} in terms of {@link #getKey()} and {@link
       * #getValue()}. If you override either of these methods, you may wish to override {@link
       * #equals(Object)} to forward to this implementation.
       *
       * @since 7.0
       */
      protected boolean standardEquals(@CheckForNull Object object) {
        if (object instanceof Entry) {
          Entry<?, ?> that = (Entry<?, ?>) object;
    Java
    - Registered: Fri Apr 05 12:43:09 GMT 2024
    - Last Modified: Tue Mar 19 19:28:11 GMT 2024
    - 4.4K bytes
    - Viewed (0)
  4. guava-testlib/src/com/google/common/collect/testing/testers/MapMergeTester.java

            getMap()
                .merge(
                    k3(),
                    v3(),
                    (oldV, newV) -> {
                      throw new AssertionFailedError(
                          "Should not call merge function if key was absent");
                    }));
        expectAdded(e3());
      }
    
      @MapFeature.Require({SUPPORTS_PUT, ALLOWS_NULL_VALUES})
      @CollectionSize.Require(absent = ZERO)
      public void testMappedToNull() {
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Feb 21 16:49:06 GMT 2024
    - 6.5K bytes
    - Viewed (0)
  5. android/guava-tests/test/com/google/common/collect/TreeMultimapExplicitTest.java

      /**
       * Compare strings lengths, and if the lengths are equal compare the strings. A {@code null} is
       * less than any non-null value.
       */
      private enum StringLength implements Comparator<@Nullable String> {
        COMPARATOR;
    
        @Override
        public int compare(@Nullable String first, @Nullable String second) {
          if (first == second) {
            return 0;
          } else if (first == null) {
            return -1;
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Thu Mar 07 18:34:03 GMT 2024
    - 8.3K bytes
    - Viewed (0)
  6. android/guava-tests/test/com/google/common/collect/TreeRangeMapTest.java

            rangeMap.put(range1, 1);
            rangeMap.put(range2, 2);
    
            Range<Integer> expected;
            if (range1.isEmpty()) {
              if (range2.isEmpty()) {
                expected = null;
              } else {
                expected = range2;
              }
            } else {
              if (range2.isEmpty()) {
                expected = range1;
              } else {
                expected = range1.span(range2);
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Thu Feb 22 20:09:59 GMT 2024
    - 28K bytes
    - Viewed (0)
  7. guava/src/com/google/common/collect/Cut.java

        return this;
      }
    
      // note: overridden by {BELOW,ABOVE}_ALL
      @Override
      public int compareTo(Cut<C> that) {
        if (that == belowAll()) {
          return 1;
        }
        if (that == aboveAll()) {
          return -1;
        }
        int result = Range.compareOrThrow(endpoint, that.endpoint);
        if (result != 0) {
          return result;
        }
        // same value. below comes before above
    Java
    - Registered: Fri Apr 05 12:43:09 GMT 2024
    - Last Modified: Thu Feb 22 21:19:52 GMT 2024
    - 12.3K bytes
    - Viewed (0)
  8. guava-tests/test/com/google/common/collect/UnmodifiableListIteratorTest.java

          int i;
    
          @Override
          public boolean hasNext() {
            return i < array.length;
          }
    
          @Override
          public String next() {
            if (!hasNext()) {
              throw new NoSuchElementException();
            }
            return array[i++];
          }
    
          @Override
          public boolean hasPrevious() {
            return i > 0;
          }
    
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Mon Feb 19 20:34:55 GMT 2024
    - 2.8K bytes
    - Viewed (0)
  9. android/guava-testlib/src/com/google/common/collect/testing/testers/AbstractListTester.java

        // Avoid expectEquals() here to delay reason manufacture until necessary.
        if (getList().size() != expectedList.size()) {
          fail("size mismatch: " + reportContext(expectedList));
        }
        for (int i = 0; i < expectedList.size(); i++) {
          E expected = expectedList.get(i);
          E actual = getList().get(i);
          if (expected != actual && (expected == null || !expected.equals(actual))) {
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Feb 21 16:49:06 GMT 2024
    - 2.8K bytes
    - Viewed (0)
  10. android/guava/src/com/google/common/collect/TableCollectors.java

          V value,
          BinaryOperator<V> mergeFunction) {
        checkNotNull(value);
        V oldValue = table.get(row, column);
        if (oldValue == null) {
          table.put(row, column, value);
        } else {
          V newValue = mergeFunction.apply(oldValue, value);
          if (newValue == null) {
            table.remove(row, column);
          } else {
            table.put(row, column, newValue);
          }
        }
      }
    
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Sat Mar 09 00:21:17 GMT 2024
    - 7.7K bytes
    - Viewed (0)
Back to top