Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 91 - 100 of 2,240 for throwIf (0.07 seconds)

  1. android/guava/src/com/google/common/collect/Iterables.java

       *
       * <p><b>Java 8+ users:</b> the {@code Stream} equivalent to this method is {@code
       * stream.collect(MoreCollectors.onlyElement())}.
       *
       * @throws NoSuchElementException if the iterable is empty
       * @throws IllegalArgumentException if the iterable contains multiple elements
       */
      @ParametricNullness
      public static <T extends @Nullable Object> T getOnlyElement(Iterable<T> iterable) {
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Tue Sep 16 18:35:28 GMT 2025
    - 43.8K bytes
    - Click Count (0)
  2. guava/src/com/google/common/collect/ImmutableSortedMap.java

      }
    
      /**
       * Guaranteed to throw an exception and leave the map unmodified.
       *
       * @throws UnsupportedOperationException always
       * @deprecated Unsupported operation.
       */
      @CanIgnoreReturnValue
      @Deprecated
      @Override
      @DoNotCall("Always throws UnsupportedOperationException")
      public final @Nullable Entry<K, V> pollFirstEntry() {
        throw new UnsupportedOperationException();
      }
    
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Thu Jan 08 18:10:02 GMT 2026
    - 52.1K bytes
    - Click Count (0)
  3. android/guava-testlib/src/com/google/common/escape/testing/EscaperAsserts.java

       */
      public static void assertBasic(Escaper escaper) throws IOException {
        // Escapers operate on characters: no characters, no escaping.
        Assert.assertEquals("", escaper.escape(""));
        // Assert that escapers throw null pointer exceptions.
        try {
          escaper.escape((String) null);
          Assert.fail("exception not thrown when escaping a null string");
        } catch (NullPointerException e) {
          // pass
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Tue Jan 18 20:55:09 GMT 2022
    - 3.8K bytes
    - Click Count (0)
  4. guava-testlib/src/com/google/common/escape/testing/EscaperAsserts.java

       */
      public static void assertBasic(Escaper escaper) throws IOException {
        // Escapers operate on characters: no characters, no escaping.
        Assert.assertEquals("", escaper.escape(""));
        // Assert that escapers throw null pointer exceptions.
        try {
          escaper.escape((String) null);
          Assert.fail("exception not thrown when escaping a null string");
        } catch (NullPointerException e) {
          // pass
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Tue Jan 18 20:55:09 GMT 2022
    - 3.8K bytes
    - Click Count (0)
  5. guava/src/com/google/common/collect/Range.java

       * given values. The returned range is {@linkplain BoundType#CLOSED closed} on both ends.
       *
       * @throws ClassCastException if the values are not mutually comparable
       * @throws NoSuchElementException if {@code values} is empty
       * @throws NullPointerException if any of {@code values} is null
       * @since 14.0
       */
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Mon Sep 22 18:35:44 GMT 2025
    - 28.3K bytes
    - Click Count (0)
  6. src/main/java/org/codelibs/core/jar/JarFileUtil.java

            return FileUtil.getCanonicalPath(jarFile);
        }
    
        /**
         * Closes the JAR file.
         * <p>
         * If {@link JarFile#close()} throws an exception, an error message is logged. The exception is not re-thrown.
         * </p>
         *
         * @param jarFile the JAR file (must not be {@literal null})
         */
        public static void close(final JarFile jarFile) {
    Created: Fri Apr 03 20:58:12 GMT 2026
    - Last Modified: Thu Jul 31 08:16:49 GMT 2025
    - 4.9K bytes
    - Click Count (0)
  7. guava/src/com/google/common/base/Preconditions.java

       * instead. However, note that {@code checkIndex()} throws {@code IndexOutOfBoundsException} when
       * {@code size} is negative, while this method throws {@code IllegalArgumentException}.
       *
       * @param index a user-supplied index identifying a position in an array, list or string
       * @param size the size of that array, list or string
       * @return the value of {@code index}
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Thu Jan 08 18:10:02 GMT 2026
    - 53.5K bytes
    - Click Count (0)
  8. android/guava/src/com/google/common/reflect/Reflection.java

       *
       * @throws ExceptionInInitializerError if an exception is thrown during initialization of a class
       */
      public static void initialize(Class<?>... classes) {
        for (Class<?> clazz : classes) {
          try {
            Class.forName(clazz.getName(), true, clazz.getClassLoader());
          } catch (ClassNotFoundException e) {
            throw new AssertionError(e);
          }
        }
      }
    
      /**
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Sat Dec 21 03:10:51 GMT 2024
    - 3.4K bytes
    - Click Count (0)
  9. android/guava-tests/test/com/google/common/util/concurrent/ServiceManagerTest.java

      }
    
      public void testToString() throws Exception {
        Service a = new NoOpService();
        Service b = new FailStartService();
        ServiceManager manager = new ServiceManager(asList(a, b));
        String toString = manager.toString();
        assertThat(toString).contains("NoOpService");
        assertThat(toString).contains("FailStartService");
      }
    
      public void testTimeouts() throws Exception {
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Mon Mar 16 22:45:21 GMT 2026
    - 25.6K bytes
    - Click Count (0)
  10. guava/src/com/google/common/collect/ImmutableMap.java

       *
       * @throws UnsupportedOperationException always
       * @deprecated Unsupported operation.
       */
      @Deprecated
      @Override
      @DoNotCall("Always throws UnsupportedOperationException")
      public final boolean replace(K key, V oldValue, V newValue) {
        throw new UnsupportedOperationException();
      }
    
      /**
       * Guaranteed to throw an exception and leave the map unmodified.
       *
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Sun Mar 08 16:16:42 GMT 2026
    - 44.7K bytes
    - Click Count (0)
Back to Top