public abstract class BaseGeometryFunction extends Object implements GeometryFunction, Comparable
GeometryFunction which provides most
of the required structure.
Extenders must supply the behaviour for the
actual function invocation.| Modifier and Type | Field and Description |
|---|---|
protected String |
category |
protected String |
description |
protected String |
name |
protected String[] |
parameterNames |
protected Class[] |
parameterTypes |
protected Class |
returnType |
| Constructor and Description |
|---|
BaseGeometryFunction(String name,
String[] parameterNames,
Class[] parameterTypes,
Class returnType) |
BaseGeometryFunction(String name,
String description,
String[] parameterNames,
Class[] parameterTypes,
Class returnType) |
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(Object o) |
boolean |
equals(Object obj)
Two functions are the same if they have the
same signature (name, parameter types and return type).
|
String |
getCategory() |
String |
getDescription() |
protected static Double |
getDoubleOrNull(Object[] args,
int index) |
protected static Integer |
getIntegerOrNull(Object[] args,
int index) |
String |
getName()
Gets the name of this function
|
String[] |
getParameterNames()
Gets the parameter names for this function
|
Class[] |
getParameterTypes()
Gets the types of the other function arguments,
if any.
|
Class |
getReturnType()
Gets the return type of this function
|
abstract Object |
invoke(Geometry geom,
Object[] args)
Invokes this function.
|
boolean |
isBinary() |
static boolean |
isBinaryGeomFunction(GeometryFunction func) |
protected String category
protected String name
protected String description
protected String[] parameterNames
protected Class[] parameterTypes
protected Class returnType
public BaseGeometryFunction(String name, String[] parameterNames, Class[] parameterTypes, Class returnType)
public static boolean isBinaryGeomFunction(GeometryFunction func)
public String getCategory()
public String getName()
GeometryFunctiongetName in interface GeometryFunctionpublic String getDescription()
public String[] getParameterNames()
GeometryFunctiongetParameterNames in interface GeometryFunctionpublic Class[] getParameterTypes()
getParameterTypes in interface GeometryFunctionpublic Class getReturnType()
GeometryFunctiongetReturnType in interface GeometryFunctionpublic boolean isBinary()
isBinary in interface GeometryFunctionpublic abstract Object invoke(Geometry geom, Object[] args)
GeometryFunctionRuntimeExceptions.invoke in interface GeometryFunctiongeom - the target geometryargs - the other arguments to the functionpublic boolean equals(Object obj)
equals in interface GeometryFunctionequals in class Objectobj - public int compareTo(Object o)
compareTo in interface ComparableCopyright © 2025. All rights reserved.