From 56b2285b8bcdf7e40f8bd6b96ccc6a8ed88baa5f Mon Sep 17 00:00:00 2001 From: h908714124 Date: Mon, 5 Jul 2021 19:23:34 +0200 Subject: [PATCH] remove api notes --- src/main/java/io/jbock/util/LeftOptional.java | 45 ------------------- 1 file changed, 45 deletions(-) diff --git a/src/main/java/io/jbock/util/LeftOptional.java b/src/main/java/io/jbock/util/LeftOptional.java index 3c9b2e3..4283311 100644 --- a/src/main/java/io/jbock/util/LeftOptional.java +++ b/src/main/java/io/jbock/util/LeftOptional.java @@ -32,12 +32,6 @@ private LeftOptional(Optional value) { * Returns an empty {@code LeftOptional} instance. No value is present for this * {@code LeftOptional}. * - * @apiNote - * Though it may be tempting to do so, avoid testing if an object is empty - * by comparing with {@code ==} or {@code !=} against instances returned by - * {@code Optional.empty()}. There is no guarantee that it is a singleton. - * Instead, use {@link #isEmpty()} or {@link #isPresent()}. - * * @param The type of the non-existent value * @return an empty {@code LeftOptional} */ @@ -90,9 +84,6 @@ public static LeftOptional ofNullable(T value) { * If a value is present, returns the value, otherwise throws * {@code NoSuchElementException}. * - * @apiNote - * The preferred alternative to this method is {@link #orElseThrow()}. - * * @return the non-{@code null} value described by this {@code LeftOptional} * @throws NoSuchElementException if no value is present */ @@ -169,24 +160,6 @@ public LeftOptional filter(Predicate predicate) { *

If the mapping function returns a {@code null} result then this method * returns an empty {@code LeftOptional}. * - * @apiNote - * This method supports post-processing on {@code LeftOptional} values, without - * the need to explicitly check for a return status. For example, the - * following code traverses a stream of URIs, selects one that has not - * yet been processed, and creates a path from that URI, returning - * an {@code Optional}: - * - *

{@code
-     *     Optional p =
-     *         uris.stream().filter(uri -> !isProcessedYet(uri))
-     *                       .findFirst()
-     *                       .map(Paths::get);
-     * }
- * - * Here, {@code findFirst} returns an {@code Optional}, and then - * {@code map} returns an {@code Optional} for the desired - * URI if one exists. - * * @param mapper the mapping function to apply to a value, if present * @param The type of the value returned from the mapping function * @return a {@code LeftOptional} describing the result of applying a mapping @@ -251,14 +224,6 @@ public LeftOptional or(Supplier> supplier * If a value is present, returns a sequential {@link Stream} containing * only that value, otherwise returns an empty {@code Stream}. * - * @apiNote - * This method can be used to transform a {@code Stream} of optional - * elements to a {@code Stream} of present value elements: - *
{@code
-     *     Stream> os = ..
-     *     Stream s = os.flatMap(Optional::stream)
-     * }
- * * @return the optional value as a {@code Stream} */ public Stream stream() { @@ -306,11 +271,6 @@ public T orElseThrow() { * If a value is present, returns the value, otherwise throws an exception * produced by the exception supplying function. * - * @apiNote - * A method reference to the exception constructor with an empty argument - * list can be used as the supplier. For example, - * {@code IllegalStateException::new} - * * @param Type of the exception to be thrown * @param exceptionSupplier the supplying function that produces an * exception to be thrown @@ -401,11 +361,6 @@ public int hashCode() { * suitable for debugging. The exact presentation format is unspecified and * may vary between implementations and versions. * - * @implSpec - * If a value is present the result must include its string representation - * in the result. Empty and present {@code LeftOptional}s must be unambiguously - * differentiable. - * * @return the string representation of this instance */ @Override