約92,500件1ページ目

日本語のみで絞り込む

条件を指定して検索しています。すべての条件を解除する

  • 最終更新日:1年以内
  • 2025/11/24 -You generally shouldn't use Optional<T> as a method argument at all. Even for internal helper methods or business logic, it's not really what Optional was ...

    2026/2/15 -So, there are solutions to avoid using Optionals as method parameters. The intent of Java when releasing Optional was to use it as a return type, thus ...

    2日前 -For method parameters, use overloading or standard null checks. For domain models and DTOs, use explicit @Nullable and @NonNull annotations (from Jakarta or ...

    2025/12/16 -Even the Java documentation is explicit: “Optional is primarily intended for use as a method return type where there is a clear need to represent 'no result'.

    2025/12/7 -Optional is a container object that may or may not contain a non-null value. It's designed to represent "optional" return values and avoid NullPointerException ...

    2026/4/13 -Using Optional as a method parameter is particularly problematic: callers must wrap their argument in Optional.of() or Optional.empty() at every call site ...

    2026/9/21 -Use method overloading, null checks, or the Builder pattern to simulate default parameter values in Java, which does not support them natively.

    2026/9/16 -Optional<T> is a container from java. · Its purpose is to make a possibly missing result visible in the method signature instead of hiding it behind null .

    2026/2/26 -The Optional type was introduced in Java 8. It provides a clear and explicit way to convey the message that there may not be a value, without using null.

    2026/6/30 -Optional are used as types for fields or parameters. Optional was designed to provide a limited mechanism for library method return types in which a clear ...