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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
package Torello.Java.Additional;

import Torello.Java.UnreachableError;

/**
 * Contains a <B>{@code static}</B> reference to a <B STYLE='color:red'>singleton</B>-instance of
 * {@code Ret0}.
 */
public class Ret0
    extends RetN
    implements java.io.Serializable
{
    /** <EMBED CLASS='external-html' DATA-FILE-ID=SVUID>  */
    protected static final long serialVersionUID = 1;

    /** This is the singleton instance of this class. */
    public static final Ret0 R0 = new Ret0();

    /** Constructs this object */
    private Ret0() { }

    // 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()
    {
        throw new UnsupportedOperationException
            ("Instances of Ret0 do not have any internal fields.");
    }

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

    /**
     * This method may not be invoked, or it will throw an exception.
     * @throws UnsupportedOperationException This class only <I>one <B>singleton</B> instance.</I>
     */
    public final Ret0 clone()
    {
        throw new UnsupportedOperationException
            ("The singleton instance of Ret0 cannot be cloned.");
    }

    /**
     * Produces the {@code Ret0} singleton-instance {@code 'toString'}
     * @return The Java Literal-String {@code "Ret0 Singleton Instance"}
     */
    @Override
    public final String toString()
    { return "Ret0 Singleton Instance"; }

    /**
     * There is only one, singleton, instance of {@code Ret0}, so reference-equality is the only
     * equality-test.
     * 
     * @return {@code TRUE} if and only if {@code 'other'} is this class' singleton instance of
     * {@code Ret0}
     */
    @Override
    public final boolean equals(Object other)
    { return this == other; }

    /**
     * Returns the hash-code for the singleton-instance of {@code Ret0}
     * @return A nice round-number, 55 to be exact.
     */
    @Override
    public final int hashCode()
    { return 55; }

    /**
     * This method is guaranteed to throw an {@code IndexOutOfBoundsExceptin}.  There aren't any 
     * fields that can be retrieved from the {@code Tuple0} Singleton-Instance.
     * 
     * @param i ignored parameter
     * @return Does not return anything.  Always throws IOOBEX.
     * @throws IndexOutOfBoundsException Always throws.
     */
    public Object get(int i)
    {
        // Always throws Out Of Bounds Exception, Cannot get from Tuple0
        CHECK_GET(i);

        // The above method should always throw IOOOBEX, this line quiets javac
        throw new UnreachableError();
    }

    public Tuple0 toModifiable()
    { return Tuple0.T0; }
}