Class DataProxy<T>

java.lang.Object
dev.roanh.gmark.util.DataProxy<T>
Type Parameters:
T - The data type to proxy.

public class DataProxy<T> extends Object
Class that can be used as a wrapper around some other object. DataProxy instances are never equal to other DataProxy instances unless they are exactly the same object. This class is intended for use with the UniqueGraph class so that multiple nodes can be added with the same data.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private T
    The stored proxy data.
  • Constructor Summary

    Constructors
    Constructor
    Description
    DataProxy(T data)
    Constructs a new DataProxy instances with the given data to proxy.
  • Method Summary

    Modifier and Type
    Method
    Description
    Gets the data stored at this data.
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

    • data

      private T data
      The stored proxy data.
  • Constructor Details

    • DataProxy

      public DataProxy(T data)
      Constructs a new DataProxy instances with the given data to proxy.
      Parameters:
      data - The data to store.
  • Method Details

    • getData

      public T getData()
      Gets the data stored at this data.
      Returns:
      The stored data.
    • toString

      public String toString()
      Overrides:
      toString in class Object