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.
    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 Number of Fields in this Class
      Modifier and Type Method
      int n()
       
      Methods: interface java.lang.Cloneable
      Modifier and Type Method
      Ret1<A> clone()
      • Methods inherited from class java.lang.Object

        equals, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Field Detail

      • serialVersionUID

        🡇    
        protected static final long serialVersionUID
        This fulfils the SerialVersion UID requirement for all classes that implement Java's interface java.io.Serializable. Using the Serializable 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;
        
      • a

        🡅  🡇    
        public final A a
        This holds a pointer the first and only response object.
        Code:
        Exact Field Declaration Expression:
         public final A a;
        
    • Method Detail

      • n

        🡅  🡇    
        public int n()
        Returns '1', indicating how many fields are declared by this class.
        Specified by:
        n in class RetN
        Returns:
        As an instance of Ret1, this method returns '1';
        Code:
        Exact Method Body:
         return 1;
        
      • clone

        🡅    
        public Ret1<Aclone()
        Fulfills Java's interface Cloneable requirements.
        Overrides:
        clone in class java.lang.Object
        Returns:
        A copy of 'this' instance of Ret1.
        Code:
        Exact Method Body:
         return new Ret1<>(this.a);