Class Referencee<T>

java.lang.Object
org.refcodes.struct.Referencee<T>
Type Parameters:
T - The type of the referencee to be encapsulated by this Referencee.

public class Referencee<T> extends Object
A Referencee encapsulates a reference to an instance which might be null at the time of the referencee's creation. This way a reference to a non yet existing object can be provided.
  • Constructor Details

    • Referencee

      public Referencee()
  • Method Details

    • getReference

      public T getReference()
      Retrieves the according reference.
      Returns:
      The according reference.
    • setReference

      public void setReference(T aReference)
      Sets the according reference.
      Parameters:
      aReference - The according reference.
    • referTo

      public T referTo(T aReference)
      Sets the according reference and returns the reference being set. With this method, a Referencee can be introduced in places where the actual reference is being created and expected.
      Parameters:
      aReference - The according reference to be set.
      Returns:
      The reference being set.