Search Options

Results per page
Sort
Preferred Languages
Advance

Results 161 - 170 of 333 for UnsupportedOperationException (0.17 sec)

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

    @SuppressWarnings("JUnit4ClassUsedInJUnit3")
    public class MultisetAddTester<E> extends AbstractMultisetTester<E> {
      @CollectionFeature.Require(absent = SUPPORTS_ADD)
      public void testAddUnsupported() {
        assertThrows(UnsupportedOperationException.class, () -> getMultiset().add(e0()));
      }
    
      @CollectionFeature.Require(SUPPORTS_ADD)
      public void testAddMeansAddOne() {
        int originalCount = getMultiset().count(e0());
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:05:46 UTC 2024
    - 4K bytes
    - Viewed (0)
  2. android/guava-testlib/src/com/google/common/collect/testing/MinimalCollection.java

      public boolean retainAll(Collection<?> elementsToRetain) {
        throw up();
      }
    
      @Override
      public void clear() {
        throw up();
      }
    
      private static UnsupportedOperationException up() {
        throw new UnsupportedOperationException();
      }
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 3.8K bytes
    - Viewed (0)
  3. android/guava-testlib/src/com/google/common/collect/testing/testers/MapReplaceTester.java

      @CollectionSize.Require(absent = ZERO)
      public void testReplace_unsupportedPresent() {
        try {
          getMap().replace(k0(), v3());
          fail("Expected UnsupportedOperationException");
        } catch (UnsupportedOperationException expected) {
        } catch (ClassCastException tolerated) {
          // for ClassToInstanceMap
        }
    
        expectUnchanged();
      }
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Oct 31 14:51:04 UTC 2024
    - 4K bytes
    - Viewed (0)
  4. guava-tests/test/com/google/common/collect/ImmutableBiMapFloodingTest.java

            Map<Object, Object> sourceMap = new LinkedHashMap<>();
            for (Entry<?, ?> entry : entries) {
              if (sourceMap.put(entry.getKey(), entry.getValue()) != null) {
                throw new UnsupportedOperationException("duplicate key");
              }
            }
            return ImmutableBiMap.copyOf(sourceMap);
          }
        },
        COPY_OF_ENTRIES {
          @Override
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 4.2K bytes
    - Viewed (0)
  5. android/guava-tests/test/com/google/common/base/StringsTest.java

            .matches(
                // J2kt nested class name does not use "$"
                "boiler <com\\.google\\.common\\.base\\.StringsTest[.$]ThrowsOnToString@[0-9a-f]+ "
                    + "threw java\\.lang\\.UnsupportedOperationException> plate");
      }
    
      public void testLenientFormat_badArgumentToString_gwtFriendly() {
        assertThat(Strings.lenientFormat("boiler %s plate", new ThrowsOnToString()))
            .matches("boiler <.*> plate");
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Sep 17 18:14:12 UTC 2024
    - 10.4K bytes
    - Viewed (0)
  6. android/guava-testlib/src/com/google/common/collect/testing/testers/MapClearTester.java

      public void testClear_unsupported() {
        assertThrows(UnsupportedOperationException.class, () -> getMap().clear());
        expectUnchanged();
      }
    
      @MapFeature.Require(absent = SUPPORTS_REMOVE)
      @CollectionSize.Require(ZERO)
      public void testClear_unsupportedByEmptyCollection() {
        try {
          getMap().clear();
        } catch (UnsupportedOperationException tolerated) {
        }
        expectUnchanged();
      }
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Oct 17 20:00:30 UTC 2024
    - 3.8K bytes
    - Viewed (0)
  7. guava-testlib/src/com/google/common/collect/testing/testers/MapRemoveEntryTester.java

      public void testRemove_unsupportedPresent() {
        assertThrows(UnsupportedOperationException.class, () -> getMap().remove(k0(), v0()));
        expectUnchanged();
      }
    
      @MapFeature.Require(absent = SUPPORTS_REMOVE)
      public void testRemove_unsupportedAbsent() {
        try {
          assertFalse(getMap().remove(k0(), v3()));
        } catch (UnsupportedOperationException tolerated) {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Oct 17 20:00:30 UTC 2024
    - 3.7K bytes
    - Viewed (0)
  8. android/guava-tests/test/com/google/common/collect/AbstractTableTest.java

        if (supportsRemove()) {
          table.clear();
          assertEquals(0, table.size());
          assertFalse(table.containsRow("foo"));
        } else {
          assertThrows(UnsupportedOperationException.class, () -> table.clear());
        }
      }
    
      public void testPut() {
        assertNull(table.put("foo", 1, cellValue('a')));
        assertNull(table.put("bar", 1, cellValue('b')));
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Oct 15 17:36:06 UTC 2024
    - 5.8K bytes
    - Viewed (0)
  9. android/guava-tests/test/com/google/common/util/concurrent/ReflectionFreeAssertThrows.java

              .put(UnsupportedCharsetException.class, e -> e instanceof UnsupportedCharsetException)
              .put(UnsupportedOperationException.class, e -> e instanceof UnsupportedOperationException)
              .put(VerifyException.class, e -> e instanceof VerifyException)
              .putAll(PlatformSpecificExceptionBatch.PLATFORM.exceptions())
              .buildOrThrow();
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Mon Oct 21 15:41:36 UTC 2024
    - 7K bytes
    - Viewed (0)
  10. android/guava/src/com/google/common/collect/ImmutableClassToInstanceMap.java

       *
       * @throws UnsupportedOperationException always
       * @deprecated Unsupported operation.
       */
      @CanIgnoreReturnValue
      @Deprecated
      @Override
      @DoNotCall("Always throws UnsupportedOperationException")
      @CheckForNull
      public <T extends B> T putInstance(Class<T> type, T value) {
        throw new UnsupportedOperationException();
      }
    
      Object readResolve() {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed May 10 21:56:03 UTC 2023
    - 7.1K bytes
    - Viewed (0)
Back to top