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 category,
String name,
String[] parameterNames,
Class[] parameterTypes,
Class returnType) |
BaseGeometryFunction(String category,
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).
|
static int |
firstScalarParamIndex(GeometryFunction func) |
String |
getCategory()
Gets the category name of this function
|
String |
getDescription()
Gets the description of this function
|
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
|
String |
getSignature()
Gets a string representing the signature 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 category, String name, String[] parameterNames, Class[] parameterTypes, Class returnType)
public static boolean isBinaryGeomFunction(GeometryFunction func)
public static int firstScalarParamIndex(GeometryFunction func)
public String getCategory()
GeometryFunctiongetCategory in interface GeometryFunctionpublic String getName()
GeometryFunctiongetName in interface GeometryFunctionpublic String getDescription()
GeometryFunctiongetDescription in interface GeometryFunctionpublic String[] getParameterNames()
GeometryFunctiongetParameterNames in interface GeometryFunctionpublic Class[] getParameterTypes()
getParameterTypes in interface GeometryFunctionpublic Class getReturnType()
GeometryFunctiongetReturnType in interface GeometryFunctionpublic boolean isBinary()
isBinary in interface GeometryFunctionpublic String getSignature()
GeometryFunctiongetSignature 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.