/*
 * Copyright 2020, TeamDev. All rights reserved.
 *
 * Redistribution and use in source and/or binary forms, with or without
 * modification, must retain the above copyright notice and the following
 * disclaimer.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */

/**
 * This package provides tuples for return values from
 * {@linkplain io.spine.server.command.Assign command handling} or
 * {@linkplain io.spine.server.command.Command commanding} methods.
 *
 * <p>Although tuples are <a href="https://github.com/google/guava/wiki/IdeaGraveyard#tuples-for-n--2">
 * considered harmful</a> in general, they are useful for describing types of several messages
 * returned by a method. Consider the following example.
 *
 * <p>The return value of the below method does not say much about the number and types
 * of returned event messages.
 * <pre>
 *     {@literal @}Assign
 *     {@literal List<Message>} on(CreateTask cmd) { ... }
 * </pre>
 *
 * The below declaration gives both number and types of the events:
 * <pre>
 *     {@literal @}Assign
 *     {@literal Pair<TaskCreated, TaskAssigned>} on(CreateTask cmd) { ... }
 * </pre>
 *
 * <p>It should be re-iterated that the purpose of this package is limited to the scenarios
 * described above. Programmers are strongly discouraged from applying tuples for other purposes.
 *
 * <h1>Generic Types</h1>
 *
 * <p>Classes provided by this package can support up to 5 generic parameters. They are named from
 * {@code <A>} through {@code <E>}.
 *
 * <p>The first generic parameter {@code <A>} must always be a specific
 * {@link com.google.protobuf.Message Message} class.
 *
 * <p>Types from {@code <B>} through {@code <E>} can be either {@code Message} or
 * {@link java.util.Optional Optional}. See sections below for details.
 *
 * <h1>Basic Tuples</h1>
 *
 * <p>The following tuple classes are provided:
 * <ul>
 *    <li>{@link io.spine.server.tuple.Pair Pair&lt;A, B&gt;}
 *    <li>{@link io.spine.server.tuple.Triplet Triplet&lt;A, B, C&gt;}
 *    <li>{@link io.spine.server.tuple.Quartet Quartet&lt;A, B, C, D&gt;}
 *    <li>{@link io.spine.server.tuple.Quintet Quintet&lt;A, B, C, D, E&gt;}
 * </ul>
 *
 * <p>Basic tuple classes allow {@link java.util.Optional Optional} starting from
 * the second generic argument.
 *
 * <h1>Alternatives</h1>
 *
 * <p>In order to define alternatively returned values, please use the following classes:
 * <ul>
 *     <li>{@link io.spine.server.tuple.EitherOf2 EitherOf2&lt;A, B&gt;}
 *     <li>{@link io.spine.server.tuple.EitherOf3 EitherOf3&lt;A, B, C&gt;}
 *     <li>{@link io.spine.server.tuple.EitherOf4 EitherOf4&lt;A, B, C, D&gt;}
 *     <li>{@link io.spine.server.tuple.EitherOf5 EitherOf5&lt;A, B, C, D, E&gt;}
 * </ul>
 *
 * <p>Generic parameters for alternatives can be only {@link com.google.protobuf.Message Message}.
 *
 * <p>We believe that a list of alternatives longer than five is hard to understand.
 * If you face a such a need, consider splitting a command into two or more independent commands
 * so that their outcome is more obvious.
 *
 * <h1>Using Tuples with Alternatives</h1>
 *
 * <p>A {@link io.spine.server.tuple.Pair Pair} can be defined with the second parameter being on
 * of the {@link io.spine.server.tuple.Either Either} subclasses, and created using
 * {@link io.spine.server.tuple.Pair#withEither(com.google.protobuf.Message,
 * io.spine.server.tuple.Either) Pair.withEither()}.
 */
@CheckReturnValue
@ParametersAreNonnullByDefault
package io.spine.server.tuple;

import com.google.errorprone.annotations.CheckReturnValue;

import javax.annotation.ParametersAreNonnullByDefault;

@@ -1627,32 +1627,27 @@
     
-%7B@literal List%3C
+List&lt;
 Message
-%3E%7D
+&gt;
  on(
@@ -1719,16 +1719,20 @@
 es both 
+the 
 number a
@@ -1747,16 +1747,25 @@
  of the 
+returned 
 events:%0A
@@ -1810,23 +1810,16 @@
     
-%7B@literal Pair%3C
+Pair&lt;
 Task
@@ -1839,18 +1839,20 @@
 Assigned
-%3E%7D
+&gt;
  on(Crea
@@ -2042,13 +2042,10 @@
 rom 
-apply
+us
 ing 
@@ -2185,13 +2185,28 @@
 ers.
+%0A *
  The
-y
+se parameters
  are
@@ -2216,19 +2216,16 @@
 med from
-%0A *
  %7B@code 
@@ -2445,16 +2445,18 @@
  either 
+a 
 %7B@code M
@@ -2464,24 +2464,27 @@
 ssage%7D or%0A *
+ an
  %7B@link java
@@ -3531,22 +3531,22 @@
 natives 
-can be
+accept
  only %7B@
@@ -3586,16 +3586,27 @@
 Message%7D
+%0A * classes
 .%0A *%0A * 

Make treating angle brackets consistent