Class BaseGeometryFunction
java.lang.Object
org.locationtech.jtstest.geomop.BaseGeometryFunction
- All Implemented Interfaces:
Comparable, GeometryFunction
- Direct Known Subclasses:
StaticMethodGeometryFunction
A base for implementations of
GeometryFunction which provides most
of the required structure.
Extenders must supply the behaviour for the
actual function invocation.- Author:
- Martin Davis
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintbooleanTwo functions are the same if they have the same signature (name, parameter types and return type).protected static DoublegetDoubleOrNull(Object[] args, int index) protected static IntegergetIntegerOrNull(Object[] args, int index) getName()Gets the name of this functionString[]Gets the parameter names for this functionClass[]Gets the types of the other function arguments, if any.Gets the return type of this functionabstract ObjectInvokes this function.booleanisBinary()static boolean
-
Field Details
-
category
-
name
-
description
-
parameterNames
-
parameterTypes
-
returnType
-
-
Constructor Details
-
BaseGeometryFunction
-
BaseGeometryFunction
-
-
Method Details
-
isBinaryGeomFunction
-
getCategory
-
getName
Description copied from interface:GeometryFunctionGets the name of this function- Specified by:
getNamein interfaceGeometryFunction- Returns:
- the name of the function
-
getDescription
-
getParameterNames
Description copied from interface:GeometryFunctionGets the parameter names for this function- Specified by:
getParameterNamesin interfaceGeometryFunction- Returns:
- the names of the function parameters
-
getParameterTypes
Gets the types of the other function arguments, if any.- Specified by:
getParameterTypesin interfaceGeometryFunction- Returns:
- the types
-
getReturnType
Description copied from interface:GeometryFunctionGets the return type of this function- Specified by:
getReturnTypein interfaceGeometryFunction- Returns:
- the type of the value returned by this function
-
isBinary
public boolean isBinary()- Specified by:
isBinaryin interfaceGeometryFunction
-
getDoubleOrNull
-
getIntegerOrNull
-
invoke
Description copied from interface:GeometryFunctionInvokes this function. Note that any exceptions returned must beRuntimeExceptions.- Specified by:
invokein interfaceGeometryFunction- Parameters:
geom- the target geometryargs- the other arguments to the function- Returns:
- the value computed by the function
-
equals
Two functions are the same if they have the same signature (name, parameter types and return type).- Specified by:
equalsin interfaceGeometryFunction- Overrides:
equalsin classObject- Parameters:
obj-- Returns:
- true if this object is the same as the obj argument
-
compareTo
- Specified by:
compareToin interfaceComparable
-