public abstract class BaseGeometryFunction extends java.lang.Object implements GeometryFunction, java.lang.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 java.lang.String |
category |
protected java.lang.String |
description |
protected java.lang.String |
name |
protected java.lang.String[] |
parameterNames |
protected java.lang.Class[] |
parameterTypes |
protected java.lang.Class |
returnType |
| Constructor and Description |
|---|
BaseGeometryFunction(java.lang.String category,
java.lang.String name,
java.lang.String[] parameterNames,
java.lang.Class[] parameterTypes,
java.lang.Class returnType) |
BaseGeometryFunction(java.lang.String category,
java.lang.String name,
java.lang.String description,
java.lang.String[] parameterNames,
java.lang.Class[] parameterTypes,
java.lang.Class returnType) |
| Modifier and Type | Method and Description |
|---|---|
private static int |
compareTo(java.lang.Class c1,
java.lang.Class c2) |
int |
compareTo(java.lang.Object o) |
boolean |
equals(java.lang.Object obj)
Two functions are the same if they have the
same signature (name, parameter types and return type).
|
static int |
firstScalarParamIndex(GeometryFunction func) |
java.lang.String |
getCategory()
Gets the category name of this function
|
java.lang.String |
getDescription()
Gets the description of this function
|
protected static java.lang.Double |
getDoubleOrNull(java.lang.Object[] args,
int index) |
protected static java.lang.Integer |
getIntegerOrNull(java.lang.Object[] args,
int index) |
java.lang.String |
getName()
Gets the name of this function
|
java.lang.String[] |
getParameterNames()
Gets the parameter names for this function
|
java.lang.Class[] |
getParameterTypes()
Gets the types of the other function arguments,
if any.
|
java.lang.Class |
getReturnType()
Gets the return type of this function
|
java.lang.String |
getSignature()
Gets a string representing the signature of this function.
|
abstract java.lang.Object |
invoke(Geometry geom,
java.lang.Object[] args)
Invokes this function.
|
boolean |
isBinary() |
static boolean |
isBinaryGeomFunction(GeometryFunction func) |
protected java.lang.String category
protected java.lang.String name
protected java.lang.String description
protected java.lang.String[] parameterNames
protected java.lang.Class[] parameterTypes
protected java.lang.Class returnType
public BaseGeometryFunction(java.lang.String category,
java.lang.String name,
java.lang.String[] parameterNames,
java.lang.Class[] parameterTypes,
java.lang.Class returnType)
public BaseGeometryFunction(java.lang.String category,
java.lang.String name,
java.lang.String description,
java.lang.String[] parameterNames,
java.lang.Class[] parameterTypes,
java.lang.Class returnType)
public static boolean isBinaryGeomFunction(GeometryFunction func)
public static int firstScalarParamIndex(GeometryFunction func)
public java.lang.String getCategory()
GeometryFunctiongetCategory in interface GeometryFunctionpublic java.lang.String getName()
GeometryFunctiongetName in interface GeometryFunctionpublic java.lang.String getDescription()
GeometryFunctiongetDescription in interface GeometryFunctionpublic java.lang.String[] getParameterNames()
GeometryFunctiongetParameterNames in interface GeometryFunctionpublic java.lang.Class[] getParameterTypes()
getParameterTypes in interface GeometryFunctionpublic java.lang.Class getReturnType()
GeometryFunctiongetReturnType in interface GeometryFunctionpublic boolean isBinary()
isBinary in interface GeometryFunctionpublic java.lang.String getSignature()
GeometryFunctiongetSignature in interface GeometryFunctionprotected static java.lang.Double getDoubleOrNull(java.lang.Object[] args,
int index)
protected static java.lang.Integer getIntegerOrNull(java.lang.Object[] args,
int index)
public abstract java.lang.Object invoke(Geometry geom, java.lang.Object[] args)
GeometryFunctionRuntimeExceptions.invoke in interface GeometryFunctiongeom - the target geometryargs - the other arguments to the functionpublic boolean equals(java.lang.Object obj)
equals in interface GeometryFunctionequals in class java.lang.Objectobj - public int compareTo(java.lang.Object o)
compareTo in interface java.lang.Comparableprivate static int compareTo(java.lang.Class c1,
java.lang.Class c2)