Class RepeaterGeometryFunction
- java.lang.Object
-
- org.locationtech.jtstest.geomfunction.RepeaterGeometryFunction
-
- All Implemented Interfaces:
GeometryFunction
public class RepeaterGeometryFunction extends java.lang.Object implements GeometryFunction
-
-
Field Summary
Fields Modifier and Type Field Description private intcountprivate GeometryFunctionfun
-
Constructor Summary
Constructors Constructor Description RepeaterGeometryFunction(GeometryFunction fun, int count)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private java.lang.Object[]copyArgs(java.lang.Object[] args, int replaceIndex, double val)java.lang.StringgetCategory()Gets the category name of this functionjava.lang.StringgetDescription()Gets the description of this functionjava.lang.StringgetName()Gets the name of this functionjava.lang.String[]getParameterNames()Gets the parameter names for this functionjava.lang.Class[]getParameterTypes()Gets the types of the other function arguments, if any.java.lang.ClassgetReturnType()Gets the return type of this functionjava.lang.StringgetSignature()Gets a string representing the signature of this function.java.lang.Objectinvoke(Geometry geom, java.lang.Object[] args)Invokes this function.private java.lang.ObjectinvokeRepeated(Geometry geom, java.lang.Object[] args, double argStart)booleanisBinary()static booleanisRepeatable(GeometryFunction fun)static intrepeatableArgIndex(GeometryFunction fun)private java.lang.StringrepeatAnnotation()-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.locationtech.jtstest.geomfunction.GeometryFunction
equals
-
-
-
-
Field Detail
-
fun
private GeometryFunction fun
-
count
private int count
-
-
Constructor Detail
-
RepeaterGeometryFunction
public RepeaterGeometryFunction(GeometryFunction fun, int count)
-
-
Method Detail
-
getCategory
public java.lang.String getCategory()
Description copied from interface:GeometryFunctionGets the category name of this function- Specified by:
getCategoryin interfaceGeometryFunction- Returns:
- the category name of the function
-
getName
public java.lang.String getName()
Description copied from interface:GeometryFunctionGets the name of this function- Specified by:
getNamein interfaceGeometryFunction- Returns:
- the name of the function
-
getDescription
public java.lang.String getDescription()
Description copied from interface:GeometryFunctionGets the description of this function- Specified by:
getDescriptionin interfaceGeometryFunction- Returns:
- the name of the function
-
getParameterNames
public java.lang.String[] getParameterNames()
Description copied from interface:GeometryFunctionGets the parameter names for this function- Specified by:
getParameterNamesin interfaceGeometryFunction- Returns:
- the names of the function parameters
-
getParameterTypes
public java.lang.Class[] getParameterTypes()
Description copied from interface:GeometryFunctionGets the types of the other function arguments, if any.- Specified by:
getParameterTypesin interfaceGeometryFunction- Returns:
- the types
-
getReturnType
public java.lang.Class 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
-
getSignature
public java.lang.String getSignature()
Description copied from interface:GeometryFunctionGets a string representing the signature of this function.- Specified by:
getSignaturein interfaceGeometryFunction- Returns:
- the string for the function signature
-
repeatAnnotation
private java.lang.String repeatAnnotation()
-
isBinary
public boolean isBinary()
- Specified by:
isBinaryin interfaceGeometryFunction
-
invoke
public java.lang.Object invoke(Geometry geom, java.lang.Object[] args)
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
-
isRepeatable
public static boolean isRepeatable(GeometryFunction fun)
-
repeatableArgIndex
public static int repeatableArgIndex(GeometryFunction fun)
-
invokeRepeated
private java.lang.Object invokeRepeated(Geometry geom, java.lang.Object[] args, double argStart)
-
copyArgs
private java.lang.Object[] copyArgs(java.lang.Object[] args, int replaceIndex, double val)
-
-