Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 11 for isAbsent (0.1 sec)

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

        assertThat(Enums.getIfPresent(TestEnum.class, "cHEETO")).isAbsent();
        assertThat(Enums.getIfPresent(TestEnum.class, "Honda")).isAbsent();
        assertThat(Enums.getIfPresent(TestEnum.class, "poodlE")).isAbsent();
      }
    
      public void testGetIfPresent_whenNoMatchingConstant() {
        assertThat(Enums.getIfPresent(TestEnum.class, "WOMBAT")).isAbsent();
      }
    
    
      @J2ktIncompatible
      @GwtIncompatible // weak references
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed May 29 16:29:37 UTC 2024
    - 8.7K bytes
    - Viewed (0)
  2. android/guava-tests/test/com/google/common/collect/FluentIterableTest.java

        assertThat(FluentIterable.from(sortedSet).first()).isAbsent();
      }
    
      public void testFirst_iterable() {
        Set<String> set = ImmutableSet.of("a", "b", "c");
        assertThat(FluentIterable.from(set).first()).hasValue("a");
      }
    
      public void testFirst_emptyIterable() {
        Set<String> set = newHashSet();
        assertThat(FluentIterable.from(set).first()).isAbsent();
      }
    
      public void testLast_list() {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 30.4K bytes
    - Viewed (0)
  3. guava-tests/test/com/google/common/io/MoreFilesTest.java

          Path dir = fs.getPath("dir");
          Files.createDirectory(dir);
    
          ByteSource source = MoreFiles.asByteSource(dir);
    
          assertThat(source.sizeIfKnown()).isAbsent();
    
          assertThrows(IOException.class, () -> source.size());
        }
      }
    
      public void testByteSource_size_ofSymlinkToDirectory() throws IOException {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Oct 17 02:42:09 UTC 2024
    - 27.4K bytes
    - Viewed (0)
  4. android/guava-tests/test/com/google/common/io/MoreFilesTest.java

          Path dir = fs.getPath("dir");
          Files.createDirectory(dir);
    
          ByteSource source = MoreFiles.asByteSource(dir);
    
          assertThat(source.sizeIfKnown()).isAbsent();
    
          assertThrows(IOException.class, () -> source.size());
        }
      }
    
      public void testByteSource_size_ofSymlinkToDirectory() throws IOException {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Oct 31 16:07:00 UTC 2024
    - 26.5K bytes
    - Viewed (0)
  5. guava-tests/test/com/google/common/net/MediaTypeTest.java

          Optional<Charset> charset = ((MediaType) field.get(null)).charset();
          if (field.getName().endsWith("_UTF_8")) {
            assertThat(charset).hasValue(UTF_8);
          } else {
            assertThat(charset).isAbsent();
          }
        }
      }
    
      @J2ktIncompatible
      @GwtIncompatible // reflection
      public void testConstants_areUnique() {
        assertThat(getConstants()).containsNoDuplicates();
      }
    
      @J2ktIncompatible
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Mon Oct 21 15:41:36 UTC 2024
    - 20.4K bytes
    - Viewed (0)
  6. android/guava-testlib/test/com/google/common/testing/ArbitraryInstancesTest.java

        assertNotNull(ArbitraryInstances.get(Joiner.class).join(ImmutableList.of("a")));
        assertNotNull(ArbitraryInstances.get(Splitter.class).split("a,b"));
        assertThat(ArbitraryInstances.get(com.google.common.base.Optional.class)).isAbsent();
        ArbitraryInstances.get(Stopwatch.class).start();
        assertNotNull(ArbitraryInstances.get(Ticker.class));
        assertFreshInstanceReturned(Random.class);
        assertEquals(
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:26:48 UTC 2024
    - 21.8K bytes
    - Viewed (0)
  7. android/guava-tests/test/com/google/common/collect/IterablesTest.java

        assertThat(tryFind(list, equalTo("pants"))).hasValue("pants");
        assertThat(tryFind(list, Predicates.alwaysTrue())).hasValue("cool");
        assertThat(tryFind(list, Predicates.alwaysFalse())).isAbsent();
        assertCanIterateAgain(list);
      }
    
      private static class TypeA {}
    
      private interface TypeB {}
    
      private static class HasBoth extends TypeA implements TypeB {}
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 19:12:33 UTC 2024
    - 45K bytes
    - Viewed (0)
  8. guava-tests/test/com/google/common/collect/IteratorsTest.java

      public void testTryFind_alwaysFalse_isPresent() {
        Iterable<String> list = Lists.newArrayList("cool", "pants");
        Iterator<String> iterator = list.iterator();
        assertThat(tryFind(iterator, Predicates.alwaysFalse())).isAbsent();
        assertFalse(iterator.hasNext());
      }
    
      public void testTransform() {
        Iterator<String> input = asList("1", "2", "3").iterator();
        Iterator<Integer> result =
            Iterators.transform(
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 54.1K bytes
    - Viewed (0)
  9. android/guava-tests/test/com/google/common/collect/IteratorsTest.java

      public void testTryFind_alwaysFalse_isPresent() {
        Iterable<String> list = Lists.newArrayList("cool", "pants");
        Iterator<String> iterator = list.iterator();
        assertThat(tryFind(iterator, Predicates.alwaysFalse())).isAbsent();
        assertFalse(iterator.hasNext());
      }
    
      public void testTransform() {
        Iterator<String> input = asList("1", "2", "3").iterator();
        Iterator<Integer> result =
            Iterators.transform(
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 54.1K bytes
    - Viewed (0)
  10. istioctl/pkg/writer/envoy/configdump/endpoint.go

    	sort.Slice(endpoints, func(i, j int) bool {
    		iDirection, iSubset, iName, iPort := safelyParseSubsetKey(endpoints[i].ClusterName)
    		jDirection, jSubset, jName, jPort := safelyParseSubsetKey(endpoints[j].ClusterName)
    		if iName == jName {
    			if iSubset == jSubset {
    				if iPort == jPort {
    					return iDirection < jDirection
    				}
    				return iPort < jPort
    			}
    			return iSubset < jSubset
    		}
    		return iName < jName
    	})
    Registered: Wed Nov 06 22:53:10 UTC 2024
    - Last Modified: Mon Jul 22 09:57:29 UTC 2024
    - 6.1K bytes
    - Viewed (0)
Back to top