Class Circle2D

  • All Implemented Interfaces:
    Shape2D

    public class Circle2D
    extends java.lang.Object
    implements Shape2D
    Simple 2D shape circle.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private double centerX_  
      private double centerY_  
      private double radius_  
      • Fields inherited from interface org.htmlunit.util.geometry.Shape2D

        epsilon
    • Constructor Summary

      Constructors 
      Constructor Description
      Circle2D​(double centerX, double centerY, double radius)
      Ctor.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean contains​(double x, double y)
      boolean isEmpty()
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

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

      • centerX_

        private final double centerX_
      • centerY_

        private final double centerY_
      • radius_

        private final double radius_
    • Constructor Detail

      • Circle2D

        public Circle2D​(double centerX,
                        double centerY,
                        double radius)
        Ctor.
        Parameters:
        centerX - x value of the second center
        centerY - y value of the second center
        radius - the radius
    • Method Detail

      • contains

        public boolean contains​(double x,
                                double y)
        Specified by:
        contains in interface Shape2D
        Parameters:
        x - point x value
        y - point y value
        Returns:
        true if the specified point is inside; false otherwise.
      • isEmpty

        public boolean isEmpty()
        Specified by:
        isEmpty in interface Shape2D
        Returns:
        true if the Shape is empty.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object