Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 287 for CHECK (0.23 sec)

  1. guava/src/com/google/common/base/NullnessCasts.java

    @GwtCompatible
    @ElementTypesAreNonnullByDefault
    final class NullnessCasts {
      /**
       * Accepts a {@code @Nullable T} and returns a plain {@code T}, without performing any check that
       * that conversion is safe.
       *
       * <p>This method is intended to help with usages of type parameters that have {@linkplain
    Java
    - Registered: Fri Apr 05 12:43:09 GMT 2024
    - Last Modified: Mon Apr 12 20:58:36 GMT 2021
    - 3.1K bytes
    - Viewed (0)
  2. android/guava-testlib/test/com/google/common/testing/anotherpackage/SomeClassThatDoesNotUseNullable.java

     * See the License for the specific language governing permissions and
     * limitations under the License.
     */
    
    package com.google.common.testing.anotherpackage;
    
    /** Does not check null, but should not matter since it's in a different package. */
    @SuppressWarnings("unused") // For use by NullPointerTester
    public class SomeClassThatDoesNotUseNullable {
    
      void packagePrivateButDoesNotCheckNull(String s) {}
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Fri Apr 21 02:27:51 GMT 2017
    - 1.1K bytes
    - Viewed (0)
  3. android/guava-tests/test/com/google/common/collect/PeekingIteratorTest.java

          assertEquals(elements, targetList);
        }
      }
    
      private <T extends @Nullable Object> void actsLikeIteratorHelper(final List<T> list) {
        // Check with modifiable copies of the list
        new PeekingIteratorTester<T>(list).test();
    
        // Check with unmodifiable lists
        new IteratorTester<T>(
            list.size() * 2 + 2, UNMODIFIABLE, list, IteratorTester.KnownOrder.KNOWN_ORDER) {
          @Override
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Thu Mar 07 18:34:03 GMT 2024
    - 9K bytes
    - Viewed (0)
  4. android/guava/src/com/google/common/collect/StandardTable.java

                // requireNonNull is safe because of the containsColumn check.
                return requireNonNull(get(entry.getKey())).equals(entry.getValue());
              }
            }
            return false;
          }
    
          @Override
          public boolean remove(@CheckForNull Object obj) {
            /*
             * `o instanceof Entry` is guaranteed by `contains`, but we check it here to satisfy our
             * nullness checker.
             */
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Fri Oct 13 14:11:58 GMT 2023
    - 29.8K bytes
    - Viewed (0)
  5. android/guava/src/com/google/common/collect/EnumMultiset.java

      }
    
      @Override
      public int size() {
        return Ints.saturatedCast(size);
      }
    
      @Override
      public int count(@CheckForNull Object element) {
        // isActuallyE checks for null, but we check explicitly to help nullness checkers.
        if (element == null || !isActuallyE(element)) {
          return 0;
        }
        Enum<?> e = (Enum<?>) element;
        return counts[e.ordinal()];
      }
    
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Apr 01 16:15:01 GMT 2024
    - 9K bytes
    - Viewed (0)
  6. guava-testlib/test/com/google/common/testing/NullPointerTesterTest.java

        public static void staticOneArgCheckForNullThrowsNPE(@javax.annotation.CheckForNull String s) {
          checkNotNull(s); // doesn't check if you said you'd accept null, but you don't
        }
    
        public static void staticOneArgNullableThrowsNPE(@Nullable String s) {
          checkNotNull(s); // doesn't check if you said you'd accept null, but you don't
        }
    
        public void oneArgCorrectlyThrowsNpe(String s) {
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Thu Nov 16 15:12:31 GMT 2023
    - 47.9K bytes
    - Viewed (0)
  7. guava-testlib/src/com/google/common/testing/AbstractPackageSanityTests.java

       *       be checked to be equal to the instance before serialization.
       *   <li>If {@code C} doesn't explicitly implement {@code equals} but instead inherits it from a
       *       superclass, no equality check is done on the deserialized instance because it's not clear
       *       whether the author intended for the class to be a value type.
       *   <li>If a constructor or factory method takes a parameter whose type is interface, a dynamic
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Fri May 12 19:22:18 GMT 2023
    - 17.5K bytes
    - Viewed (0)
  8. android/guava/src/com/google/common/reflect/TypeVisitor.java

      private final Set<Type> visited = Sets.newHashSet();
    
      /**
       * Visits the given types. Null types are ignored. This allows subclasses to call {@code
       * visit(parameterizedType.getOwnerType())} safely without having to check nulls.
       */
      public final void visit(@Nullable Type... types) {
        for (Type type : types) {
          if (type == null || !visited.add(type)) {
            // null owner type, or already visited;
            continue;
          }
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Fri Apr 16 21:10:04 GMT 2021
    - 3.7K bytes
    - Viewed (0)
  9. android/guava-tests/test/com/google/common/cache/CacheBuilderTest.java

            .start();
    
        // wait for the computingEntry to be created
        computationStarted.await();
        cache.invalidateAll();
        // let the computation proceed
        computingLatch.countDown();
        // don't check cache.size() until we know the get("b") call is complete
        computationComplete.await();
    
        // At this point, the listener should be holding the seed value (a -> a), and the map should
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Tue Oct 03 20:10:02 GMT 2023
    - 23.2K bytes
    - Viewed (0)
  10. guava/src/com/google/common/base/SmallCharMatcher.java

        int index = startingIndex;
        do {
          if (table[index] == 0) { // Check for empty.
            return false;
          } else if (table[index] == c) { // Check for match.
            return true;
          } else { // Linear probing.
            index = (index + 1) & mask;
          }
          // Check to see if we wrapped around the whole table.
        } while (index != startingIndex);
        return false;
      }
    
    Java
    - Registered: Fri Apr 05 12:43:09 GMT 2024
    - Last Modified: Fri Feb 09 15:49:48 GMT 2024
    - 4.5K bytes
    - Viewed (0)
Back to top