約5,960件1ページ目

日本語のみで絞り込む

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

  • 最終更新日:1年以内
  • 2026/9/24 -ofNullable() checks the supplied value and creates an Optional containing the value when it is non-null or returns an empty Optional when it is null.

    2026/2/15 -Optional makes us deal with nullable values explicitly as a way of enforcing good programming practices. Let's now look at how the above code could be ...

    2026/4/13 -Optional is not a null eliminator — it is an API contract: a method that returns Optional<T> is telling callers explicitly that no value may exist, forcing them ...

    2026/5/1 -Instead, use method overloading or @Nullable annotations. 3. Chaining Optional for Control Flow. Optional.ofNullable(getCustomer()) .map(Customer::getAddress)

    2026/6/30 -Reports uses of Optional.ofNullable() where always null or always not-null argument is passed. There's no point in using Optional.ofNullable() in this case: ...

    2025/12/8 -The ofNullable() method works the same as of() , except that instead of throwing a NullPointerException , a null value produces an empty . The Kotlin equivalent ...

    2025/12/10 -The key goal is to return a value wrapped in an Optional to explicitly signal that it might be absent. This avoids returning null directly and provides fluent ...

    2025/12/7 -✓ RECOMMENDED - Use These ; Optional.ofNullable(), Most common - when value might be null, Optional.ofNullable(getUserName()) ; map(), Transform value if present ...

    2025/11/10 -Learn how to migrate nullable constructions from Java to Kotlin. This guide covers support for nullable types in Kotlin, how Kotlin treats nullable ...

    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.