Class AbstractGeometricPrimitive

java.lang.Object
com.amalgamasimulation.geometry.AbstractGeometricPrimitive
Direct Known Subclasses:
Point, Polyline, Segment

public abstract class AbstractGeometricPrimitive extends Object
Abstract class representing a geometric primitive like Point, Segment or Polyline
Author:
Andrey Malykhanov
  • Constructor Details

    • AbstractGeometricPrimitive

      public AbstractGeometricPrimitive()
  • Method Details

    • containsPoint

      public abstract boolean containsPoint(Point point)
      Checks whether this primitive contains the specified point
      Parameters:
      point - the specified point
      Returns:
      true if this primitive contains the specified point, false otherwise
    • toCodeString

      public abstract String toCodeString()
      Returns the string representing Java code that creates this primitive in its current state
      Returns:
      Java code required to create this primitive in its current state