Class 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 Detail

      • 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 Detail

      • getRectangle

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

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

        public int hashCode()
        Overrides:
        hashCode in class Object