Search Options

Results per page
Sort
Preferred Languages
Advance

Results 91 - 100 of 105 for ClassCastException (0.33 sec)

  1. src/main/java/jcifs/smb/SmbTreeImpl.java

        @Override
        public <T extends SmbTree> T unwrap(final Class<T> type) {
            if (type.isAssignableFrom(this.getClass())) {
                return (T) this;
            }
            throw new ClassCastException();
        }
    
        /**
         * @param track
         * @return tree with increased usage count
         */
        public SmbTreeImpl acquire(final boolean track) {
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sun Aug 31 08:00:57 UTC 2025
    - 30K bytes
    - Viewed (0)
  2. android/guava/src/com/google/common/reflect/TypeResolver.java

            resolvedOwner, (Class<?>) resolvedRawType, resolvedArgs);
      }
    
      private static <T> T expectArgument(Class<T> type, Object arg) {
        try {
          return type.cast(arg);
        } catch (ClassCastException e) {
          throw new IllegalArgumentException(arg + " is not a " + type.getSimpleName());
        }
      }
    
      /** A TypeTable maintains mapping from {@link TypeVariable} to types. */
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Wed Sep 03 14:03:14 UTC 2025
    - 24.2K bytes
    - Viewed (0)
  3. android/guava/src/com/google/common/cache/CacheBuilder.java

       *
       * <p><b>Warning:</b> if you ignore the above advice, and use this {@code CacheBuilder} to build a
       * cache whose key or value type is incompatible with the weigher, you will likely experience a
       * {@link ClassCastException} at some <i>undefined</i> point in the future.
       *
       * @param weigher the weigher to use in calculating the weight of cache entries
       * @return this {@code CacheBuilder} instance (for chaining)
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 51.7K bytes
    - Viewed (0)
  4. guava/src/com/google/common/reflect/TypeResolver.java

            resolvedOwner, (Class<?>) resolvedRawType, resolvedArgs);
      }
    
      private static <T> T expectArgument(Class<T> type, Object arg) {
        try {
          return type.cast(arg);
        } catch (ClassCastException e) {
          throw new IllegalArgumentException(arg + " is not a " + type.getSimpleName());
        }
      }
    
      /** A TypeTable maintains mapping from {@link TypeVariable} to types. */
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Wed Sep 03 14:03:14 UTC 2025
    - 24.2K bytes
    - Viewed (0)
  5. android/guava/src/com/google/common/collect/ImmutableRangeSet.java

            return false;
          }
          try {
            @SuppressWarnings("unchecked") // we catch CCE's
            C c = (C) o;
            return ImmutableRangeSet.this.contains(c);
          } catch (ClassCastException e) {
            return false;
          }
        }
    
        @Override
        int indexOf(@Nullable Object target) {
          if (contains(target)) {
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Mon Aug 11 19:31:30 UTC 2025
    - 27.4K bytes
    - Viewed (0)
  6. android/guava-tests/test/com/google/common/base/PredicatesTest.java

          @GwtIncompatible @J2ktIncompatible private static final long serialVersionUID = 1L;
    
          @Override
          public boolean contains(@Nullable Object element) {
            throw new ClassCastException("");
          }
        }
        Collection<Integer> nums = new CollectionThatThrowsClassCastException<>();
        nums.add(3);
        Predicate<Integer> isThree = Predicates.in(nums);
        assertFalse(isThree.apply(3));
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 32.2K bytes
    - Viewed (0)
  7. android/guava/src/com/google/common/collect/Sets.java

          int thisSize = 0;
          for (E e : this) {
            try {
              if (!that.contains(e)) {
                return false;
              }
            } catch (NullPointerException | ClassCastException ignored) {
              return false;
            }
            thisSize++;
          } // that.containsAll(this) so that.size() >= this.size()
    
          if (thisSize == thatMaxSize) {
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 81.6K bytes
    - Viewed (0)
  8. mockwebserver/src/main/kotlin/mockwebserver3/MockWebServer.kt

       * Scripts [response] to be returned to a request made in sequence. The first request is
       * served by the first enqueued response; the second request by the second enqueued response; and
       * so on.
       *
       * @throws ClassCastException if the default dispatcher has been
       * replaced with [setDispatcher][dispatcher].
       */
      public fun enqueue(response: MockResponse) {
        (dispatcher as QueueDispatcher).enqueue(response)
      }
    
      /**
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Sat Aug 02 20:36:00 UTC 2025
    - 40.3K bytes
    - Viewed (0)
  9. android/guava/src/com/google/common/collect/Iterables.java

       * Objects.equals(o, element)} would return {@code true}. Otherwise returns {@code false}, even in
       * cases where {@link Collection#contains} might throw {@link NullPointerException} or {@link
       * ClassCastException}.
       */
      public static boolean contains(Iterable<?> iterable, @Nullable Object element) {
        if (iterable instanceof Collection) {
          Collection<?> collection = (Collection<?>) iterable;
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 43.6K bytes
    - Viewed (0)
  10. android/guava/src/com/google/common/collect/Multimaps.java

       * type {@code K}. Using an {@code EntryTransformer} key type for which this may not hold, such as
       * {@code ArrayList}, may risk a {@code ClassCastException} when calling methods on the
       * transformed multimap.
       *
       * @since 7.0
       */
      public static <
              K extends @Nullable Object, V1 extends @Nullable Object, V2 extends @Nullable Object>
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Sat Aug 09 01:14:59 UTC 2025
    - 86.6K bytes
    - Viewed (0)
Back to top