Package Torello.Java.Additional
Class Tuple0
- java.lang.Object
-
- Torello.Java.Additional.MultiType
-
- Torello.Java.Additional.TupleN
-
- Torello.Java.Additional.Tuple0
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Cloneable
public class Tuple0 extends TupleN implements java.io.Serializable
Contains astatic
reference to a singleton-instance ofTuple0
.- See Also:
- Serialized Form
Hi-Lited Source-Code:- View Here: Torello/Java/Additional/Tuple0.java
- Open New Browser-Tab: Torello/Java/Additional/Tuple0.java
File Size: 2,912 Bytes Line Count: 93 '\n' Characters Found
-
-
Field Summary
Serializable ID Modifier and Type Field protected static long
serialVersionUID
Tuple0 Singleton Instance Modifier and Type Field static Tuple0
T0
-
Method Summary
Retrieve the Number of Fields in this Class Modifier and Type Method int
n()
Abstract-Implementing Stub Method Modifier and Type Method Object
get(int i)
Ret0
toImmutable()
Methods: interface java.lang.Cloneable Modifier and Type Method Tuple0
clone()
Methods: class java.lang.Object Modifier and Type Method boolean
equals(Object other)
int
hashCode()
String
toString()
-
-
-
Field Detail
-
serialVersionUID
protected static final long serialVersionUID
This fulfils the SerialVersion UID requirement for all classes that implement Java'sinterface java.io.Serializable
. Using theSerializable
Implementation offered by java is very easy, and can make saving program state when debugging a lot easier. It can also be used in place of more complicated systems like "hibernate" to store data as well.- See Also:
- Constant Field Values
- Code:
- Exact Field Declaration Expression:
protected static final long serialVersionUID = 1;
-
T0
-
-
Method Detail
-
n
-
clone
-
toString
-
equals
public final boolean equals(java.lang.Object other)
There is only one, singleton, instance ofTuple0
, so reference-equality is the only equality-test.
-
hashCode
-
get
public java.lang.Object get(int i)
This method is guaranteed to throw anIndexOutOfBoundsExceptin
. There aren't any fields that can be retrieved from theTuple0
Singleton-Instance.- Specified by:
get
in classMultiType
- Parameters:
i
- ignored parameter- Returns:
- Does not return anything. Always throws IOOBEX.
- Throws:
java.lang.IndexOutOfBoundsException
- Always throws.- See Also:
MultiType.get(int, Class)
,MultiType.GET(int)
- Code:
- Exact Method Body:
// 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();
-
toImmutable
public Ret0 toImmutable()
Description copied from class:TupleN
- Specified by:
toImmutable
in classTupleN
- Returns:
- A
RetN
of the same size, which is an immutable type whose fields have been decorated with the'final'
modifier - and therefore cannot be changed once the instance has been constructed. - Code:
- Exact Method Body:
return Ret0.R0;
-
-