Class AbstractShape

java.lang.Object
org.apache.sis.internal.referencing.j2d.AbstractShape
All Implemented Interfaces:
Shape
Direct Known Subclasses:
EmptyShape, ShapeAdapter, ShapeWrapper

public abstract class AbstractShape extends Object implements Shape
Base class for some (not all) shape implementations in Apache SIS. This base class provides a mechanism for determining if a shape stores coordinate values as simple-precision or double-precision floating point numbers.
Since:
1.2
Version:
1.2
  • Field Details

    • FLOAT_SHAPES

      private static final Class<?>[] FLOAT_SHAPES
      Base classes of Java2D implementations known to store coordinates as single-precision floating point numbers.
  • Constructor Details

    • AbstractShape

      protected AbstractShape()
      Creates a new shape.
  • Method Details

    • isFloat

      protected boolean isFloat()
      Returns true if this shape backed by primitive float values.
      Returns:
      true if this shape is backed by float coordinate values.
    • isFloat

      public static boolean isFloat(Object shape)
      Returns true if the given shape is presumed backed by primitive float values. The given object should be an instance of Shape or Point2D.
      Parameters:
      shape - the shape for which to determine the backing primitive type.
      Returns:
      true if the given shape is presumed backed by float coordinate values.