Class Ret1<A>

  • Type Parameters:
    A - The type of the only member-field ('a').
    All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable

    public class Ret1<A>
    extends RetN
    implements java.io.Serializable, java.lang.Cloneable
    This simple Generic-Class exists mainly for the case where a function or Type-Parameter needs to return a class that inherits RetN, but only has one return-value. Outside of that particular scenario, there isn't much point to a Ret1 instance.

    Immutable, Read-Only: Classes which inherit Ancestor-Class RetN will always contains fields declared using the 'final' modifier. These classes are, therefore, "Unmodifiable Tuples" - meaning their contents can never change once they have been instantiated.

    Remember: The classes Ret1 and Tuple1 completely identical, with the sole difference being that Ret1 fields are all declared 'final', but the Tuple1 fields are not!
    See Also:
    Serialized Form


    • Field Summary

       
      Serializable ID
      Modifier and Type Field
      protected static long serialVersionUID
       
      Instance Fields
      Modifier and Type Field
      A a
    • Constructor Summary

      Constructors 
      Constructor
      Ret1​(A a)
    • Method Summary

       
      Retrieve the Number of Fields in this Class
      Modifier and Type Method
      int n()
       
      Retrieve a Field by Field-Number
      Modifier and Type Method
      A get​(int i)
       
      Convert this instance to a Read-Write Tuple, of the same size
      Modifier and Type Method
      Tuple1<A> toModifiable()
       
      Methods: interface java.lang.Cloneable
      Modifier and Type Method
      Ret1<A> clone()
      • Methods inherited from class java.lang.Object

        finalize, getClass, notify, notifyAll, wait, wait, wait