Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 10 for ClassCastException (0.31 sec)

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

       * Object[])} comparator when comparing a value outside the set of values it can compare.
       * Extending {@link ClassCastException} may seem odd, but it is required.
       */
      @VisibleForTesting
      static class IncomparableValueException extends ClassCastException {
        final Object value;
    
        IncomparableValueException(Object value) {
          super("Cannot compare value: " + value);
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Apr 24 19:38:27 GMT 2024
    - 39.4K bytes
    - Viewed (0)
  2. android/guava/src/com/google/common/collect/Comparators.java

       * Comparators}</a>.
       *
       * @param a first value to compare, returned if less than or equal to b.
       * @param b second value to compare.
       * @throws ClassCastException if the parameters are not <i>mutually comparable</i>.
       * @since 30.0
       */
      public static <T extends Comparable<? super T>> T min(T a, T b) {
        return (a.compareTo(b) <= 0) ? a : b;
      }
    
      /**
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed May 01 18:44:57 GMT 2024
    - 10.2K bytes
    - Viewed (0)
  3. android/guava/src/com/google/common/collect/Maps.java

      /**
       * Delegates to {@link Map#get}. Returns {@code null} on {@code ClassCastException} and {@code
       * NullPointerException}.
       */
      @CheckForNull
      static <V extends @Nullable Object> V safeGet(Map<?, V> map, @CheckForNull Object key) {
        checkNotNull(map);
        try {
          return map.get(key);
        } catch (ClassCastException | NullPointerException e) {
          return null;
        }
      }
    
      /**
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed May 01 18:44:57 GMT 2024
    - 159.6K bytes
    - Viewed (0)
  4. android/guava/src/com/google/common/collect/ImmutableSortedMultiset.java

       * undocumented and subject to change.
       *
       * <p>This method is not type-safe, as it may be called on elements that are not mutually
       * comparable.
       *
       * @throws ClassCastException if the elements are not mutually comparable
       * @throws NullPointerException if any of {@code elements} is null
       */
      public static <E> ImmutableSortedMultiset<E> copyOf(Iterable<? extends E> elements) {
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed May 01 18:44:57 GMT 2024
    - 35.7K bytes
    - Viewed (0)
  5. android/guava/src/com/google/common/collect/ImmutableSortedSet.java

       * undocumented and subject to change.
       *
       * <p>This method is not type-safe, as it may be called on elements that are not mutually
       * comparable.
       *
       * @throws ClassCastException if the elements are not mutually comparable
       * @throws NullPointerException if any of {@code elements} is null
       */
      public static <E> ImmutableSortedSet<E> copyOf(Iterable<? extends E> elements) {
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed May 01 18:44:57 GMT 2024
    - 36.9K bytes
    - Viewed (0)
  6. 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(@CheckForNull Object target) {
          if (contains(target)) {
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed May 01 18:44:57 GMT 2024
    - 27.2K bytes
    - Viewed (0)
  7. 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>
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed May 01 18:44:57 GMT 2024
    - 86.4K bytes
    - Viewed (0)
  8. 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}.
       */
      // <? extends @Nullable Object> instead of <?> because of Kotlin b/189937072, discussed in Joiner.
      public static boolean contains(
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Apr 24 19:38:27 GMT 2024
    - 42.8K bytes
    - Viewed (0)
  9. android/guava/src/com/google/common/collect/Sets.java

        }
        if (object instanceof Set) {
          Set<?> o = (Set<?>) object;
    
          try {
            return s.size() == o.size() && s.containsAll(o);
          } catch (NullPointerException | ClassCastException ignored) {
            return false;
          }
        }
        return false;
      }
    
      /**
       * Returns an unmodifiable view of the specified navigable set. This method allows modules to
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed May 01 18:44:57 GMT 2024
    - 77.4K bytes
    - Viewed (0)
  10. android/guava/src/com/google/common/collect/ImmutableSortedMap.java

       * undocumented and subject to change.
       *
       * <p>This method is not type-safe, as it may be called on a map with keys that are not mutually
       * comparable.
       *
       * @throws ClassCastException if the keys in {@code map} are not mutually comparable
       * @throws NullPointerException if any key or value in {@code map} is null
    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