Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 520 for throw (0.34 sec)

  1. android/guava/src/com/google/common/base/Preconditions.java

     *
     * <p>If the precondition is not met, the {@code Preconditions} method throws an unchecked exception
     * of a specified type, which helps the method in which the exception was thrown communicate that
     * its caller has made a mistake. This allows constructs such as
     *
     * <pre>{@code
     * public static double sqrt(double value) {
     *   if (value < 0) {
     *     throw new IllegalArgumentException("input is negative: " + value);
     *   }
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Thu Apr 11 11:52:14 GMT 2024
    - 52.9K bytes
    - Viewed (0)
  2. guava-tests/test/com/google/common/util/concurrent/JSR166TestCase.java

          throw t;
        }
      }
    
      /** Calls threadFail with message "should throw exception". */
      public void threadShouldThrow() {
        threadFail("should throw exception");
      }
    
      /** Calls threadFail with message "should throw" + exceptionName. */
      public void threadShouldThrow(String exceptionName) {
        threadFail("should throw " + exceptionName);
      }
    
      /**
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Thu Feb 22 17:15:24 GMT 2024
    - 37.7K bytes
    - Viewed (0)
  3. guava-testlib/src/com/google/common/collect/testing/AbstractIteratorTester.java

          if (!features.contains(methodFeature)) {
            if (stackWithLastReturnedElementAtTop == null) {
              throw PermittedMetaException.UOE_OR_ISE;
            } else {
              throw PermittedMetaException.UOE;
            }
          } else if (stackWithLastReturnedElementAtTop == null) {
            throw PermittedMetaException.ISE;
          }
        }
    
        private List<E> getElements() {
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Apr 01 16:15:01 GMT 2024
    - 21.3K bytes
    - Viewed (0)
  4. guava/src/com/google/common/base/Throwables.java

       *   throwIfUnchecked(failure);
       *   throw new AssertionError(failure);
       * }
       * </pre>
       *
       * @since 20.0
       */
      public static void throwIfUnchecked(Throwable throwable) {
        checkNotNull(throwable);
        if (throwable instanceof RuntimeException) {
          throw (RuntimeException) throwable;
        }
        if (throwable instanceof Error) {
          throw (Error) throwable;
        }
      }
    
      /**
    Java
    - Registered: Fri Apr 05 12:43:09 GMT 2024
    - Last Modified: Wed Mar 06 15:38:58 GMT 2024
    - 20.6K bytes
    - Viewed (0)
  5. android/guava/src/com/google/common/base/Throwables.java

       *   throwIfUnchecked(failure);
       *   throw new AssertionError(failure);
       * }
       * </pre>
       *
       * @since 20.0
       */
      public static void throwIfUnchecked(Throwable throwable) {
        checkNotNull(throwable);
        if (throwable instanceof RuntimeException) {
          throw (RuntimeException) throwable;
        }
        if (throwable instanceof Error) {
          throw (Error) throwable;
        }
      }
    
      /**
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Mar 06 15:38:58 GMT 2024
    - 20.6K bytes
    - Viewed (0)
  6. guava/src/com/google/common/collect/ImmutableRangeMap.java

      @DoNotCall("Always throws UnsupportedOperationException")
      public final void putCoalescing(Range<K> range, V value) {
        throw new UnsupportedOperationException();
      }
    
      /**
       * Guaranteed to throw an exception and leave the {@code RangeMap} unmodified.
       *
       * @throws UnsupportedOperationException always
       * @deprecated Unsupported operation.
       */
      @Deprecated
      @Override
    Java
    - Registered: Fri Apr 05 12:43:09 GMT 2024
    - Last Modified: Mon Apr 01 16:15:01 GMT 2024
    - 14.7K bytes
    - Viewed (0)
  7. android/guava/src/com/google/common/util/concurrent/Monitor.java

      }
    
      /**
       * Enters this monitor when the guard is satisfied. Blocks indefinitely, but may be interrupted.
       *
       * @throws InterruptedException if interrupted while waiting
       */
      public void enterWhen(Guard guard) throws InterruptedException {
        if (guard.monitor != this) {
          throw new IllegalMonitorStateException();
        }
        final ReentrantLock lock = this.lock;
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Dec 04 18:22:01 GMT 2023
    - 38.6K bytes
    - Viewed (0)
  8. android/guava/src/com/google/common/base/Joiner.java

       * Iterable)}, except that it does not throw {@link IOException}.
       *
       * @since 11.0
       */
      @CanIgnoreReturnValue
      public final StringBuilder appendTo(
          StringBuilder builder, Iterator<? extends @Nullable Object> parts) {
        try {
          appendTo((Appendable) builder, parts);
        } catch (IOException impossible) {
          throw new AssertionError(impossible);
        }
        return builder;
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Fri Dec 15 19:31:54 GMT 2023
    - 18.6K bytes
    - Viewed (0)
  9. android/guava/src/com/google/common/util/concurrent/FakeTimeLimiter.java

          Callable<T> callable, long timeoutDuration, TimeUnit timeoutUnit) throws ExecutionException {
        checkNotNull(callable);
        checkNotNull(timeoutUnit);
        try {
          return callable.call();
        } catch (RuntimeException e) {
          throw new UncheckedExecutionException(e);
        } catch (Exception e) {
          restoreInterruptIfIsInterruptedException(e);
          throw new ExecutionException(e);
        } catch (Error e) {
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Thu Dec 14 20:35:03 GMT 2023
    - 3.5K bytes
    - Viewed (0)
  10. android/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")
      @CheckForNull
      public final Entry<K, V> pollFirstEntry() {
        throw new UnsupportedOperationException();
      }
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed May 01 18:44:57 GMT 2024
    - 53.2K bytes
    - Viewed (0)
Back to top