Class BaseGeometryFunction

    • Field Detail

      • category

        protected String category
      • description

        protected String description
      • parameterNames

        protected String[] parameterNames
      • parameterTypes

        protected Class[] parameterTypes
      • returnType

        protected Class returnType
    • Constructor Detail

      • BaseGeometryFunction

        public BaseGeometryFunction​(String name,
                                    String[] parameterNames,
                                    Class[] parameterTypes,
                                    Class returnType)
      • BaseGeometryFunction

        public BaseGeometryFunction​(String name,
                                    String description,
                                    String[] parameterNames,
                                    Class[] parameterTypes,
                                    Class returnType)
    • Method Detail

      • isBinaryGeomFunction

        public static boolean isBinaryGeomFunction​(GeometryFunction func)
      • getCategory

        public String getCategory()
      • getDescription

        public String getDescription()
      • getParameterTypes

        public Class[] getParameterTypes()
        Gets the types of the other function arguments, if any.
        Specified by:
        getParameterTypes in interface GeometryFunction
        Returns:
        the types
      • getReturnType

        public Class getReturnType()
        Description copied from interface: GeometryFunction
        Gets the return type of this function
        Specified by:
        getReturnType in interface GeometryFunction
        Returns:
        the type of the value returned by this function
      • getDoubleOrNull

        protected static Double getDoubleOrNull​(Object[] args,
                                                int index)
      • getIntegerOrNull

        protected static Integer getIntegerOrNull​(Object[] args,
                                                  int index)
      • invoke

        public abstract Object invoke​(Geometry geom,
                                      Object[] args)
        Description copied from interface: GeometryFunction
        Invokes this function. Note that any exceptions returned must be RuntimeExceptions.
        Specified by:
        invoke in interface GeometryFunction
        Parameters:
        geom - the target geometry
        args - the other arguments to the function
        Returns:
        the value computed by the function
      • equals

        public boolean equals​(Object obj)
        Two functions are the same if they have the same signature (name, parameter types and return type).
        Specified by:
        equals in interface GeometryFunction
        Overrides:
        equals in class Object
        Parameters:
        obj -
        Returns:
        true if this object is the same as the obj argument