Search Options

Results per page
Sort
Preferred Languages
Advance

Results 51 - 60 of 1,731 for isInstance (0.05 sec)

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

       * This does perform a little more work than necessary, so another option is to insert an
       * unchecked cast at some later point:
       *
       * {@snippet :
       * @SuppressWarnings("unchecked") // safe because of ::isInstance check
       * ImmutableList<NewType> result =
       *     (ImmutableList) stream.filter(NewType.class::isInstance).collect(toImmutableList());
       * }
       */
    Registered: Fri Dec 26 12:43:10 UTC 2025
    - Last Modified: Mon Nov 17 22:50:48 UTC 2025
    - 43.6K bytes
    - Viewed (0)
  2. src/main/java/jcifs/pac/ASN1Util.java

         * @return object cast to type
         * @throws PACDecodingException if types are incompatible
         */
        public static <T> T as(final Class<T> type, final Object object) throws PACDecodingException {
            if (!type.isInstance(object)) {
                throw new PACDecodingException("Incompatible object types " + type + " " + object.getClass());
            }
    
            return type.cast(object);
        }
    
        /**
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Sat Aug 16 01:32:48 UTC 2025
    - 8.2K bytes
    - Viewed (0)
  3. impl/maven-core/src/main/java/org/apache/maven/plugin/PluginParameterExpressionEvaluatorV4.java

                    }
                }
            }
    
            return value;
        }
    
        private static boolean isTypeCompatible(Class<?> type, Object value) {
            if (type.isInstance(value)) {
                return true;
            }
            // likely Boolean -> boolean, Short -> int etc. conversions, it's not the problem case we try to avoid
    Registered: Sun Dec 28 03:35:09 UTC 2025
    - Last Modified: Fri Jan 24 17:29:44 UTC 2025
    - 9.8K bytes
    - Viewed (0)
  4. guava-testlib/test/com/google/common/testing/ClassSanityTesterTest.java

          this.wrapped = checkNotNull(wrapped);
        }
    
        @Override
        public boolean equals(@Nullable Object obj) {
          // In general getClass().isInstance() is bad for equals.
          // But here we fully control the subclasses to ensure symmetry.
          if (getClass().isInstance(obj)) {
            Wrapper that = (Wrapper) obj;
            return wrapped.equals(that.wrapped);
          }
          return false;
        }
    
        @Override
    Registered: Fri Dec 26 12:43:10 UTC 2025
    - Last Modified: Tue Oct 28 16:03:47 UTC 2025
    - 36.3K bytes
    - Viewed (0)
  5. okhttp-tls/src/main/kotlin/okhttp3/tls/internal/der/Adapters.kt

            when {
              isOptional && value == optionalValue -> {
                // Write nothing.
              }
    
              else -> {
                for ((type, adapter) in choices) {
                  if (type.isInstance(value) || (value == null && type == Unit::class)) {
                    (adapter as DerAdapter<Any?>).toDer(writer, value)
                    return
                  }
                }
              }
            }
          }
    
    Registered: Fri Dec 26 11:42:13 UTC 2025
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 15K bytes
    - Viewed (0)
  6. impl/maven-core/src/test/java/org/apache/maven/graph/DefaultGraphBuilderTest.java

                assertEquals(1, ((Collection) result.getProblems()).size());
                result.getProblems().forEach(p -> {
                    assertTrue(expectedException.isInstance(p.getException()));
                    assertTrue(p.getException().getMessage().contains(partOfMessage));
                });
            }
        }
    
        @Test
    Registered: Sun Dec 28 03:35:09 UTC 2025
    - Last Modified: Tue Dec 09 20:39:03 UTC 2025
    - 28K bytes
    - Viewed (0)
  7. android/guava-tests/test/com/google/common/util/concurrent/JSR166TestCase.java

        }
    
        @Override
        public final void run() {
          try {
            realRun();
            threadShouldThrow(exceptionClass.getSimpleName());
          } catch (Throwable t) {
            if (!exceptionClass.isInstance(t)) threadUnexpectedException(t);
          }
        }
      }
    
      public abstract class ThreadShouldThrow extends Thread {
        protected abstract void realRun() throws Throwable;
    
        final Class<?> exceptionClass;
    Registered: Fri Dec 26 12:43:10 UTC 2025
    - Last Modified: Thu Dec 11 20:07:52 UTC 2025
    - 37.8K bytes
    - Viewed (0)
  8. impl/maven-core/src/main/java/org/apache/maven/DefaultMaven.java

        private void persistResumptionData(MavenExecutionResult result, MavenSession session) {
            boolean hasLifecycleExecutionExceptions =
                    result.getExceptions().stream().anyMatch(LifecycleExecutionException.class::isInstance);
    
            if (hasLifecycleExecutionExceptions) {
                MavenProject rootProject = session.getAllProjects().stream()
                        .filter(MavenProject::isExecutionRoot)
                        .findFirst()
    Registered: Sun Dec 28 03:35:09 UTC 2025
    - Last Modified: Mon May 05 16:58:52 UTC 2025
    - 28.7K bytes
    - Viewed (1)
  9. android/guava/src/com/google/common/util/concurrent/AbstractFutureState.java

                            for (Field f : k.getDeclaredFields()) {
                              f.setAccessible(true);
                              Object x = f.get(null);
                              if (k.isInstance(x)) {
                                return k.cast(x);
                              }
                            }
                            throw new NoSuchFieldError("the Unsafe");
                          });
    Registered: Fri Dec 26 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 33.2K bytes
    - Viewed (0)
  10. guava/src/com/google/common/util/concurrent/AbstractFutureState.java

                            for (Field f : k.getDeclaredFields()) {
                              f.setAccessible(true);
                              Object x = f.get(null);
                              if (k.isInstance(x)) {
                                return k.cast(x);
                              }
                            }
                            throw new NoSuchFieldError("the Unsafe");
                          });
    Registered: Fri Dec 26 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 34.8K bytes
    - Viewed (0)
Back to top