Class GeometryMethodOperation

  • All Implemented Interfaces:
    GeometryOperation

    public class GeometryMethodOperation
    extends java.lang.Object
    implements GeometryOperation
    Invokes a named operation on a set of arguments, the first of which is a Geometry. This class provides operations which are the methods defined on the Geometry class. Other GeometryOperation classes can delegate to instances of this class to run standard Geometry methods.
    Version:
    1.7
    Author:
    Martin Davis
    • Constructor Detail

      • GeometryMethodOperation

        public GeometryMethodOperation()
    • Method Detail

      • isBooleanFunction

        public static boolean isBooleanFunction​(java.lang.String name)
      • isIntegerFunction

        public static boolean isIntegerFunction​(java.lang.String name)
      • isDoubleFunction

        public static boolean isDoubleFunction​(java.lang.String name)
      • isGeometryFunction

        public static boolean isGeometryFunction​(java.lang.String name)
      • getGeometryReturnType

        public static java.lang.Class getGeometryReturnType​(java.lang.String functionName)
      • getReturnType

        public java.lang.Class getReturnType​(java.lang.String opName)
        Description copied from interface: GeometryOperation
        Gets the class of the return type of the given operation.
        Specified by:
        getReturnType in interface GeometryOperation
        Parameters:
        opName - the name of the operation
        Returns:
        the class of the return type of the specified operation
      • invoke

        public Result invoke​(java.lang.String opName,
                             Geometry geometry,
                             java.lang.Object[] args)
                      throws java.lang.Exception
        Description copied from interface: GeometryOperation
        Invokes an operation on a Geometry.
        Specified by:
        invoke in interface GeometryOperation
        Parameters:
        opName - name of the operation
        geometry - the geometry to process
        args - the arguments to the operation (which may be typed as Strings)
        Returns:
        the result of the operation
        Throws:
        java.lang.Exception - if some error was encountered trying to find or process the operation