Class Rectangle2D

  • java.lang.Object
    • com.here.sdk.core.Rectangle2D

  • public final class Rectangle2D
    extends java.lang.Object

    Represents a 2D rectangle defined by the origin and size.

    • Field Summary

      Fields 
      Modifier and Type Field Description
      Point2D origin
      The origin specifies the top-left corner of the rectangle.
      Size2D size
      The size specifies the width and height of the rectangle.
    • Constructor Summary

      Constructors 
      Constructor Description
      Rectangle2D​(Point2D origin, Size2D size)
      Creates a new instance.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object obj)  
      int hashCode()  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • origin

        @NonNull
        public Point2D origin

        The origin specifies the top-left corner of the rectangle. When this point is used to indicate the coordinates on a view, then (0,0) will mark the top-left corner of the view. The size determines the width and height of the rectangle. The width expands towards the right of the view. The height expands towards the bottom of the view.

      • size

        @NonNull
        public Size2D size

        The size specifies the width and height of the rectangle.

    • Constructor Detail

      • Rectangle2D

        public Rectangle2D​(@NonNull
                           Point2D origin,
                           @NonNull
                           Size2D size)

        Creates a new instance.

        Parameters:
        origin -

        The origin specifies the top-left corner of the rectangle. When this point is used to indicate the coordinates on a view, then (0,0) will mark the top-left corner of the view. The size determines the width and height of the rectangle. The width expands towards the right of the view. The height expands towards the bottom of the view.

        size -

        The size specifies the width and height of the rectangle.

    • Method Detail

      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object