Class CodeCoordinatesUtil
java.lang.Object
com.pnfsoftware.jeb.core.output.code.coordinates.CodeCoordinatesUtil
Utility methods for
ICodeCoordinates
implementing classes.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic int
Calculate the distance between two coordinates.static Integer
getBaseObjectIndex
(ICodeCoordinates coords) Provide the base object index of a coordinates object.static Integer
getMethodObjectIndex
(ICodeCoordinates coords) Provide the method object index of a coordinates object.static ICodeCoordinates
Determine which coordinates appear to be the most "accurate".
-
Constructor Details
-
CodeCoordinatesUtil
public CodeCoordinatesUtil()
-
-
Method Details
-
getBaseObjectIndex
Provide the base object index of a coordinates object.- Parameters:
coords
-- Returns:
- an index, null if the coordinates object does not use a base object (eg,
NativeCoordinates
)
-
getMethodObjectIndex
Provide the method object index of a coordinates object.- Parameters:
coords
-- Returns:
- an index, null if the coordinates object does not use a method object
-
distance
Calculate the distance between two coordinates.- Parameters:
a
- first coordinatesb
- second coordinates- Returns:
- a positive number
-
getMostAccurate
Determine which coordinates appear to be the most "accurate".- Parameters:
a
- first coordinatesb
- second coordinates- Returns:
- whichever coordinates appear to be the most accurate; if no determination can Be found, the first coordinates are preferred.
-