1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
package Torello.Java.Additional;

/**
 * This simple generic-class allows a function to return <B STYLE='color:red'>six</B> objects as a
 * result, instead of just one.   This is not always so useful, and can make code confusing.
 * However there are some instances where the only alternative would be to create an entirely new
 * class/object, when only a single method result would use that object.
 *
 * <BR /><BR /><B>ALSO: </B> For the classes Ret6, Ret7 &amp; Ret8 - the variable name includes a
 * number as well, since the letters become progressively more difficult to look at as they
 * increase past "A, B, C, D..."
 * 
 * @param <A1> The type of the <B STYLE='color:red'>first</B> member-field ({@code 'a1'}).
 * @param <B2> The type of the <B STYLE='color:red'>second</B> member-field ({@code 'b2'}).
 * @param <C3> The type of the <B STYLE='color:red'>third</B> member-field ({@code 'c3'}).
 * @param <D4> The type of the <B STYLE='color:red'>fourth</B> member-field ({@code 'd4'}).
 * @param <E5> The type of the <B STYLE='color:red'>fifth</B> member-field ({@code 'e5'}).
 * @param <F6> The type of the <B STYLE='color:red'>last</B> member-field ({@code 'f6'}).
 */
public class Ret6<A1, B2, C3, D4, E5, F6>
    extends RetN
    implements java.io.Serializable, Cloneable
{
    /** <EMBED CLASS='external-html' DATA-FILE-ID=SVUID>  */
    protected static final long serialVersionUID = 1;

    /** This holds a pointer the first response object. */
    public final A1 a1;

    /** This holds a pointer to the second response object. */
    public final B2 b2;

    /** This holds a pointer to the third response object. */
    public final C3 c3;

    /** This holds a pointer to the fourth response object. */
    public final D4 d4;

    /** This holds a pointer to the fifth response object. */
    public final E5 e5;

    /** This holds a pointer to the sixth response object. */
    public final F6 f6;

    /** Constructs this object */
    public Ret6(A1 a1, B2 b2, C3 c3, D4 d4, E5 e5, F6 f6)
    {
        this.a1 = a1;
        this.b2 = b2;
        this.c3 = c3;

        this.d4 = d4;
        this.e5 = e5;
        this.f6 = f6;
    }

    /**
     * Returns {@code '6'}, indicating how many fields are declared by this class.
     * 
     * @return As in instance of {@code Ret6}, this method returns {@code '6'};
     */
    public int n() { return 6; }

    // Super-class uses this for toString, equals, and hashCode
    // There is an optimization, so if this is requested multiple times, it is saved in a
    // transient field.
    final Object[] asArrayInternal()
    { return new Object[] { a1, b2, c3, d4, e5, f6 }; }

    /**
     * Fulfills Java's {@code interface Cloneable} requirements.
     * 
     * @return A copy of {@code 'this'} instance of {@code Ret6}.
     */
    public Ret6<A1, B2, C3, D4, E5, F6> clone()
    { return new Ret6<>(this.a1, this.b2, this.c3, this.d4, this.e5, this.f6); }

}