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 int
count
private GeometryFunction
fun
-
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.String
getCategory()
Gets the category name of this functionjava.lang.String
getDescription()
Gets the description of this functionjava.lang.String
getName()
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.Class
getReturnType()
Gets the return type of this functionjava.lang.String
getSignature()
Gets a string representing the signature of this function.java.lang.Object
invoke(Geometry geom, java.lang.Object[] args)
Invokes this function.private java.lang.Object
invokeRepeated(Geometry geom, java.lang.Object[] args, double argStart)
boolean
isBinary()
static boolean
isRepeatable(GeometryFunction fun)
static int
repeatableArgIndex(GeometryFunction fun)
private java.lang.String
repeatAnnotation()
-
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:GeometryFunction
Gets the category name of this function- Specified by:
getCategory
in interfaceGeometryFunction
- Returns:
- the category name of the function
-
getName
public java.lang.String getName()
Description copied from interface:GeometryFunction
Gets the name of this function- Specified by:
getName
in interfaceGeometryFunction
- Returns:
- the name of the function
-
getDescription
public java.lang.String getDescription()
Description copied from interface:GeometryFunction
Gets the description of this function- Specified by:
getDescription
in interfaceGeometryFunction
- Returns:
- the name of the function
-
getParameterNames
public java.lang.String[] getParameterNames()
Description copied from interface:GeometryFunction
Gets the parameter names for this function- Specified by:
getParameterNames
in interfaceGeometryFunction
- Returns:
- the names of the function parameters
-
getParameterTypes
public java.lang.Class[] getParameterTypes()
Description copied from interface:GeometryFunction
Gets the types of the other function arguments, if any.- Specified by:
getParameterTypes
in interfaceGeometryFunction
- Returns:
- the types
-
getReturnType
public java.lang.Class getReturnType()
Description copied from interface:GeometryFunction
Gets the return type of this function- Specified by:
getReturnType
in interfaceGeometryFunction
- Returns:
- the type of the value returned by this function
-
getSignature
public java.lang.String getSignature()
Description copied from interface:GeometryFunction
Gets a string representing the signature of this function.- Specified by:
getSignature
in interfaceGeometryFunction
- Returns:
- the string for the function signature
-
repeatAnnotation
private java.lang.String repeatAnnotation()
-
isBinary
public boolean isBinary()
- Specified by:
isBinary
in interfaceGeometryFunction
-
invoke
public java.lang.Object invoke(Geometry geom, java.lang.Object[] args)
Description copied from interface:GeometryFunction
Invokes this function. Note that any exceptions returned must beRuntimeException
s.- Specified by:
invoke
in 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)
-
-