Search Options

Results per page
Sort
Preferred Languages
Advance

Results 51 - 60 of 171 for isPresent (0.23 sec)

  1. maven-core/src/test/java/org/apache/maven/internal/impl/TestApi.java

            assertNotNull(resolved);
            assertNotNull(resolved.getKey());
            assertNotNull(resolved.getValue());
            Optional<Path> op = session.getArtifactPath(resolved.getKey());
            assertTrue(op.isPresent());
            assertEquals(resolved.getValue(), op.get());
        }
    
        @Test
        void testBuildProject() {
            Artifact artifact = session.createArtifact("org.codehaus.plexus", "plexus-utils", "1.4.5", "pom");
    Java
    - Registered: Sun Apr 28 03:35:10 GMT 2024
    - Last Modified: Thu Apr 25 14:13:36 GMT 2024
    - 9.9K bytes
    - Viewed (2)
  2. guava-tests/benchmark/com/google/common/io/ByteSourceAsCharSourceReadBenchmark.java

          @Override
          String read(ByteSource byteSource, Charset cs) throws IOException {
            Optional<Long> size = byteSource.sizeIfKnown();
            // if we know the size and it fits in an int
            if (size.isPresent() && size.get().longValue() == size.get().intValue()) {
              // otherwise try to presize a StringBuilder
              // it is kind of lame that we need to construct a decoder to access this value.
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Mon Oct 10 19:45:10 GMT 2022
    - 5.2K bytes
    - Viewed (0)
  3. android/guava-tests/benchmark/com/google/common/io/ByteSourceAsCharSourceReadBenchmark.java

          @Override
          String read(ByteSource byteSource, Charset cs) throws IOException {
            Optional<Long> size = byteSource.sizeIfKnown();
            // if we know the size and it fits in an int
            if (size.isPresent() && size.get().longValue() == size.get().intValue()) {
              // otherwise try to presize a StringBuilder
              // it is kind of lame that we need to construct a decoder to access this value.
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Oct 10 19:45:10 GMT 2022
    - 5.2K bytes
    - Viewed (0)
  4. maven-api-impl/src/main/java/org/apache/maven/internal/impl/model/DefaultModelProcessor.java

                    try {
                        Optional<Model> model =
                                parser.locateAndParse(projectDirectory, Map.of(ModelParser.STRICT, request.isStrict()));
                        if (model.isPresent()) {
                            return model.get().withPomFile(pomFile);
                        }
                    } catch (ModelParserException e) {
                        exceptions.add(e);
                    }
                }
    Java
    - Registered: Sun May 05 03:35:11 GMT 2024
    - Last Modified: Fri Apr 12 10:50:18 GMT 2024
    - 5.8K bytes
    - Viewed (0)
  5. guava-tests/test/com/google/common/io/CharSourceTester.java

        assertEquals(expected.length(), source.length());
      }
    
      public void testLengthIfKnown() throws IOException {
        Optional<Long> lengthIfKnown = source.lengthIfKnown();
        if (lengthIfKnown.isPresent()) {
          assertEquals(expected.length(), (long) lengthIfKnown.get());
        }
      }
    
      public void testReadLines_withProcessor() throws IOException {
        List<String> list =
            source.readLines(
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Mon Oct 10 19:45:10 GMT 2022
    - 7.3K bytes
    - Viewed (0)
  6. maven-core/src/main/java/org/apache/maven/internal/impl/DefaultProjectManager.java

        }
    
        @Nonnull
        @Override
        public Optional<Path> getPath(Project project) {
            Optional<Artifact> mainArtifact = project.getMainArtifact();
            if (mainArtifact.isPresent()) {
                return artifactManager.getPath(mainArtifact.get());
            }
            return Optional.empty();
        }
    
        @Nonnull
        @Override
    Java
    - Registered: Sun May 05 03:35:11 GMT 2024
    - Last Modified: Mon Mar 25 10:50:01 GMT 2024
    - 7.3K bytes
    - Viewed (0)
  7. android/guava/src/com/google/common/net/InternetDomainName.java

       */
      private static boolean matchesType(
          Optional<PublicSuffixType> desiredType, Optional<PublicSuffixType> actualType) {
        return desiredType.isPresent() ? desiredType.equals(actualType) : actualType.isPresent();
      }
    
      /** Returns the domain name, normalized to all lower case. */
      @Override
      public String toString() {
        return name;
      }
    
      /**
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Feb 05 20:47:23 GMT 2024
    - 28K bytes
    - Viewed (0)
  8. guava-testlib/src/com/google/common/testing/AbstractPackageSanityTests.java

        LinkedHashSet<Class<?>> candidateClasses = Sets.newLinkedHashSet();
        for (Class<?> cls : classes) {
          Optional<String> testedClassName = TEST_SUFFIX.chop(cls.getName());
          if (testedClassName.isPresent()) {
            Class<?> testedClass = classMap.get(testedClassName.get());
            if (testedClass != null) {
              testClasses.put(testedClass, cls);
            }
          } else {
            candidateClasses.add(cls);
    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)
  9. android/guava/src/com/google/common/base/MoreObjects.java

            return ((Collection<?>) value).isEmpty();
          } else if (value instanceof Map) {
            return ((Map<?, ?>) value).isEmpty();
          } else if (value instanceof Optional) {
            return !((Optional) value).isPresent();
          } else if (value.getClass().isArray()) {
            return Array.getLength(value) == 0;
          }
          return false;
        }
    
        /**
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Fri Oct 13 14:11:58 GMT 2023
    - 15.4K bytes
    - Viewed (0)
  10. guava-tests/benchmark/com/google/common/base/EnumsBenchmark.java

      @Benchmark
      boolean getIfPresent(int repetitions) {
        boolean retVal = false;
        for (int i = 0; i < repetitions; ++i) {
          retVal &= Enums.getIfPresent(enumType, sampleData[i & 255]).isPresent();
        }
        return retVal;
      }
    
      private enum SmallEnum {
        X0,
        X1,
        X2
      }
    
      private enum MediumEnum {
        X0,
        X1,
        X2,
        X3,
        X4,
        X5,
        X6,
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Thu Feb 22 17:15:24 GMT 2024
    - 29.4K bytes
    - Viewed (0)
Back to top