Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 5 of 5 for orElseThrow (0.08 sec)

  1. api/maven-api-core/src/main/java/org/apache/maven/api/services/ExtensibleEnumRegistry.java

    public interface ExtensibleEnumRegistry<T extends ExtensibleEnum> extends Service {
        @Nonnull
        Optional<T> lookup(@Nonnull String id);
    
        @Nonnull
        default T require(@Nonnull String id) {
            return lookup(id).orElseThrow(() -> new IllegalArgumentException("Unknown extensible enum value '" + id + "'"));
        }
    Registered: Sun Nov 03 03:35:11 UTC 2024
    - Last Modified: Wed Feb 28 23:54:53 UTC 2024
    - 1.3K bytes
    - Viewed (0)
  2. api/maven-api-core/src/main/java/org/apache/maven/api/services/TypeRegistry.java

         *
         * @param id the id of the type to retrieve
         * @return the type
         */
        @Nonnull
        @Override
        default Type require(@Nonnull String id) {
            return lookup(id).orElseThrow(() -> new IllegalArgumentException("Unknown extensible enum value '" + id + "'"));
        }
    Registered: Sun Nov 03 03:35:11 UTC 2024
    - Last Modified: Fri Apr 12 10:50:18 UTC 2024
    - 1.6K bytes
    - Viewed (0)
  3. compat/maven-compat/src/test/java/org/apache/maven/SimpleLookup.java

        @Override
        public <T> T lookup(Class<T> type) {
            return objects.stream()
                    .filter(type::isInstance)
                    .map(type::cast)
                    .findAny()
                    .orElseThrow(() -> new LookupException("No service of type " + type));
        }
    
        @Override
        public <T> T lookup(Class<T> type, String name) {
            return null;
        }
    
        @Override
    Registered: Sun Nov 03 03:35:11 UTC 2024
    - Last Modified: Fri Oct 25 12:31:46 UTC 2024
    - 2K bytes
    - Viewed (0)
  4. src/main/java/org/codelibs/fess/app/service/AccessTokenService.java

                    stream(request.getParameterValues(name)).of(stream -> stream.filter(StringUtil::isNotBlank).forEach(permissionSet::add));
                    return OptionalEntity.of(permissionSet);
                }).orElseThrow(() -> new InvalidAccessTokenException("invalid_token", "Invalid token: " + token));
            }
            return OptionalEntity.empty();
        }
    Registered: Thu Oct 31 13:40:30 UTC 2024
    - Last Modified: Thu Feb 22 01:53:18 UTC 2024
    - 4.6K bytes
    - Viewed (0)
  5. impl/maven-cli/src/main/java/org/apache/maven/cling/invoker/Utils.java

            return getCanonicalPath(Optional.ofNullable(
                            ServiceLoader.load(RootLocator.class).iterator().next().findMandatoryRoot(topDirectory))
                    .orElseThrow());
        }
    Registered: Sun Nov 03 03:35:11 UTC 2024
    - Last Modified: Fri Oct 25 12:31:46 UTC 2024
    - 6K bytes
    - Viewed (0)
Back to top