java.lang.Object
org.refcodes.struct.Referencee<T>
- Type Parameters:
T
- The type of the referencee to be encapsulated by thisReferencee
.
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 Summary
Constructors Constructor Description Referencee()
-
Method Summary
Modifier and Type Method Description T
getReference()
Retrieves the according reference.T
referTo(T aReference)
Sets the according reference and returns the reference being set.void
setReference(T aReference)
Sets the according reference.
-
Constructor Details
-
Referencee
public Referencee()
-
-
Method Details
-
getReference
Retrieves the according reference.- Returns:
- The according reference.
-
setReference
Sets the according reference.- Parameters:
aReference
- The according reference.
-
referTo
Sets the according reference and returns the reference being set. With this method, aReferencee
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.
-