Interface Reference<T>


public interface Reference<T>
A very general purpose interface to provide a reference to an object that may or may not be available. Uses can range from allowing someone else to attach/detach the value, to calculating the reference on the fly.

Does not support null values, as null represents "not available". If you need to pass null, you should use a sentinel that extends from T to indicate the null condition.

  • Method Summary

    Modifier and Type
    Method
    Description
    get()
     
  • Method Details

    • get

      T get()
      Returns:
      the referenced object. Returns NULL if the reference is not available.