Class RectangleAndPayload<T>

java.lang.Object
org.djutils.quadtree.RectangleAndPayload<T>
Type Parameters:
T - Object; the payload
All Implemented Interfaces:
Serializable

class RectangleAndPayload<T> extends Object implements Serializable
Container for a Rectangle and a payload.
  • Constructor Details

    • RectangleAndPayload

      RectangleAndPayload(Rectangle rectangle, T payload)
      Construct a new RectangleAndPayload object.
      Parameters:
      rectangle - Rectangle; the bounding rectangle of the payload
      payload - T; the payload
  • Method Details

    • getRectangle

      public Rectangle getRectangle()
      Retrieve the bounding rectangle.
      Returns:
      Rectangle; the bounding rectangle
    • getPayload

      public T getPayload()
      Retrieve the payload.
      Returns:
      T; the payload
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object