Search Options

Results per page
Sort
Preferred Languages
Advance

Results 51 - 60 of 1,288 for null (0.12 sec)

  1. guava-tests/test/com/google/common/base/OptionalTest.java

      }
    
      public void testOf_null() {
        try {
          Optional.of(null);
          fail();
        } catch (NullPointerException expected) {
        }
      }
    
      public void testFromNullable() {
        Optional<String> optionalName = Optional.fromNullable("bob");
        assertEquals("bob", optionalName.get());
      }
    
      public void testFromNullable_null() {
        // not promised by spec, but easier to test
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Feb 21 18:32:41 GMT 2024
    - 11.2K bytes
    - Viewed (0)
  2. guava/src/com/google/common/collect/JdkBackedImmutableMap.java

          if (oldValue != null) {
            if (throwIfDuplicateKeys) {
              throw conflictException("key", entryArray[i], entryArray[i].getKey() + "=" + oldValue);
            }
            if (duplicates == null) {
              duplicates = new HashMap<>();
            }
            duplicates.put(key, value);
            dupCount++;
          }
        }
        if (duplicates != null) {
          @SuppressWarnings({"rawtypes", "unchecked"})
    Java
    - Registered: Fri Apr 05 12:43:09 GMT 2024
    - Last Modified: Thu Nov 30 21:54:06 GMT 2023
    - 4.8K bytes
    - Viewed (0)
  3. guava-testlib/src/com/google/common/collect/testing/google/AbstractMultimapTester.java

       */
      protected Entry<K, V>[] createArrayWithNullValue() {
        Entry<K, V>[] array = createSamplesArray();
        int nullValueLocation = getNullLocation();
        Entry<K, V> oldEntry = array[nullValueLocation];
        array[nullValueLocation] = Helpers.mapEntry(oldEntry.getKey(), null);
        return array;
      }
    
      /**
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Feb 21 16:49:06 GMT 2024
    - 6K bytes
    - Viewed (0)
  4. guava-testlib/src/com/google/common/collect/testing/AbstractCollectionTester.java

       * Equivalent to {@link #expectMissing(Object[]) expectMissing}{@code (null)} except that the call
       * to {@code contains(null)} is permitted to throw a {@code NullPointerException}.
       *
       * @param message message to use upon assertion failure
       */
      protected void expectNullMissingWhenNullUnsupported(String message) {
        try {
          assertFalse(message, actualContents().contains(null));
        } catch (NullPointerException tolerated) {
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Feb 21 16:49:06 GMT 2024
    - 2.6K bytes
    - Viewed (0)
  5. guava/src/com/google/common/collect/DiscreteDomain.java

        @Override
        @CheckForNull
        public Integer next(Integer value) {
          int i = value;
          return (i == Integer.MAX_VALUE) ? null : i + 1;
        }
    
        @Override
        @CheckForNull
        public Integer previous(Integer value) {
          int i = value;
          return (i == Integer.MIN_VALUE) ? null : i - 1;
        }
    
        @Override
        Integer offset(Integer origin, long distance) {
          checkNonnegative(distance, "distance");
    Java
    - Registered: Fri Apr 05 12:43:09 GMT 2024
    - Last Modified: Thu Feb 22 21:19:52 GMT 2024
    - 10.3K bytes
    - Viewed (0)
  6. guava-tests/test/com/google/common/base/ConverterTest.java

        assertEquals("forward", nullsArePassed.convert(null));
        assertEquals("backward", nullsArePassed.reverse().convert("foo"));
        assertEquals("backward", nullsArePassed.reverse().convert(null));
      }
    
      public void testNullIsNotPassedThrough() {
        Converter<String, String> nullsAreHandled = sillyConverter(true);
        assertEquals("forward", nullsAreHandled.convert("foo"));
        assertEquals(null, nullsAreHandled.convert(null));
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Fri Oct 06 17:02:33 GMT 2023
    - 7.8K bytes
    - Viewed (0)
  7. android/guava-tests/benchmark/com/google/common/base/ToStringHelperBenchmark.java

            helper
                .add(SHORT_NAME, "x")
                .add(LONG_NAME, "y")
                .add(SHORT_NAME, null)
                .add(LONG_NAME, null)
                .addValue("z")
                .addValue("")
                .addValue(null)
                .add(SHORT_NAME, Arrays.asList("A"))
                .add(LONG_NAME, Arrays.asList("B"))
                .add(SHORT_NAME, Arrays.asList())
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Fri May 14 22:05:11 GMT 2021
    - 4.3K bytes
    - Viewed (0)
  8. android/guava-tests/test/com/google/common/hash/FunnelsTest.java

      }
    
      public void testForBytes_null() {
        assertNullsThrowException(Funnels.byteArrayFunnel());
      }
    
      public void testForStrings() {
        PrimitiveSink primitiveSink = mock(PrimitiveSink.class);
        Funnels.unencodedCharsFunnel().funnel("test", primitiveSink);
        verify(primitiveSink).putUnencodedChars("test");
      }
    
      public void testForStrings_null() {
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Fri Oct 02 16:24:50 GMT 2020
    - 5.9K bytes
    - Viewed (0)
  9. guava-tests/test/com/google/common/collect/TableCollectionTest.java

        CollectionSize.ANY, CollectionFeature.ALLOWS_NULL_QUERIES
      };
    
      private static final Feature<?>[] COLLECTION_FEATURES_ORDER = {
        CollectionSize.ANY, CollectionFeature.KNOWN_ORDER, CollectionFeature.ALLOWS_NULL_QUERIES
      };
    
      private static final Feature<?>[] COLLECTION_FEATURES_REMOVE = {
        CollectionSize.ANY, CollectionFeature.SUPPORTS_REMOVE, CollectionFeature.ALLOWS_NULL_QUERIES
      };
    
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Mon Feb 19 20:34:55 GMT 2024
    - 35.3K bytes
    - Viewed (0)
  10. android/guava/src/com/google/common/collect/LinkedHashMultimap.java

         * bytecode rewriting that checks for any null value that passes through an API with a
         * known-non-null type? But that particular problem might not arise here, since we're not
         * actually reading from the fields in any case in which they might be null (as proven by the
         * requireNonNull checks below). Plus, we're *already* lying here, since newHeader passes a null
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Thu Feb 22 21:19:52 GMT 2024
    - 23.6K bytes
    - Viewed (0)
Back to top