Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Java 8 compliant Javadoc #92

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/main/java/com/esri/core/geometry/BucketSort.java
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ public void sort(AttributeStreamOfInt32 indices, int begin, int end,
* @param capacity
* - the number of elements to sort (-1 if not known). The
* bucket_count are usually equal.
* @return Returns False, if the bucket sort cannot be used with the given
* @return {@code false} if the bucket sort cannot be used with the given
* parameters. The method also can throw out of memory exception. In
* the later case, one should fall back to the regular sort.
*/
Expand All @@ -159,6 +159,7 @@ private boolean reset(int bucket_count, double min_value, double max_value,
}

/**
* TODO
* Adds new element to the bucket builder. The value must be between
* min_value and max_value.
*
Expand All @@ -175,7 +176,7 @@ private int getBucket(double value) {
}

/**
* Returns the bucket count.
* @return the bucket count.
*/
private int getBucketCount() {
return m_buckets.size();
Expand Down
26 changes: 19 additions & 7 deletions src/main/java/com/esri/core/geometry/CombineOperator.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,25 @@ public interface CombineOperator {
* Operation on two geometries, returning a third. Examples include
* Intersection, Difference, and so forth.
*
* @param geom1 and geom2 are the geometry instances to be operated on.
* @param sr The spatial reference to get the tolerance value from.
* When sr is null, the tolerance is calculated from the input geometries.
* @param progressTracker ProgressTracker instance that is used to cancel the lengthy operation. Can be null.
* @return Returns the result geoemtry. In some cases the returned value can point to geom1 or geom2
* instance. For example, the OperatorIntersection may return geom2 when it is completely
* inside of the geom1.
* @param geom1
* the first geometry of the parameter pair to be operated on.
*
* @param geom2
* the second geometry of the parameter pair to be operated on.
*
* @param sr
* The spatial reference to get the tolerance value from.
* When sr is null, the tolerance is calculated from the input
* geometries.
*
* @param progressTracker
* ProgressTracker instance that is used to cancel the lengthy
* operation. Can be null.
*
* @return the result geoemtry. In some cases the returned value can point
* to geom1 or geom2 instance. For example, the
* OperatorIntersection may return geom2 when it is completely
* inside of the geom1.
*/
public Geometry execute(Geometry geom1, Geometry geom2,
SpatialReference sr, ProgressTracker progressTracker);
Expand Down
39 changes: 27 additions & 12 deletions src/main/java/com/esri/core/geometry/ConvexHull.java
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,10 @@ private ConvexHull(Point2D[] points) {

/**
* Adds a geometry to the current bounding geometry using an incremental
* algorithm for dynamic insertion. \param geometry The geometry to add to
* the bounding geometry.
* algorithm for dynamic insertion.
*
* @param geometry
* The geometry to add to the bounding geometry.
*/

void addGeometry(Geometry geometry) {
Expand Down Expand Up @@ -96,8 +98,10 @@ Geometry getBoundingGeometry() {

/**
* Static method to construct the convex hull of a Multi_vertex_geometry.
* Returns a Polygon. \param mvg The geometry used to create the convex
* hull.
* Returns a Polygon.
*
* @param mvg
* The geometry used to create the convex hull.
*/

static Polygon construct(MultiVertexGeometry mvg) {
Expand Down Expand Up @@ -157,10 +161,17 @@ static Polygon construct(MultiVertexGeometry mvg) {
* Static method to construct the convex hull from an array of points. The
* out_convex_hull array will be populated with the subset of index
* positions which contribute to the convex hull. Returns the number of
* points in the convex hull. \param points The points used to create the
* convex hull. \param count The number of points in the input Point2D
* array. \param out_convex_hull An index array allocated by the user at
* least as big as the size of the input points array.
* points in the convex hull.
*
* @param points
* The points used to create the convex hull.
*
* @param count
* The number of points in the input Point2D array.
*
* @param out_convex_hull
* An index array allocated by the user at least as big as the size
* of the input points array. TODO
*/
static int construct(Point2D[] points, int count, int[] bounding_geometry) {
ConvexHull convex_hull = new ConvexHull(points);
Expand Down Expand Up @@ -199,10 +210,14 @@ static int construct(Point2D[] points, int count, int[] bounding_geometry) {
}

/**
* Returns true if the given path of the input MultiPath is convex. Returns
* false otherwise. \param multi_path The MultiPath to check if the path is
* convex. \param path_index The path of the MultiPath to check if its
* convex.
* @param multi_path
* The MultiPath to check if the path is convex.
*
* @param path_index
* The path of the MultiPath to check if its convex.
*
* @return {@code true} if the given path of the input MultiPath is convex.
* Return {@code false} otherwise.
*/
static boolean isPathConvex(MultiPath multi_path, int path_index,
ProgressTracker progress_tracker) {
Expand Down
16 changes: 10 additions & 6 deletions src/main/java/com/esri/core/geometry/Envelope.java
Original file line number Diff line number Diff line change
Expand Up @@ -958,9 +958,11 @@ public Point getUpperLeft() {
/**
* Checks if this envelope contains (covers) the specified point.
*
* @param p
* The Point to be tested for coverage.
* @return TRUE if this envelope contains (covers) the specified point.
* @param p
* The Point to be tested for coverage.
*
* @return {@code true} if this envelope contains (covers) the specified
* point.
*/
public boolean contains(Point p) {
if (p.isEmpty())
Expand All @@ -971,9 +973,11 @@ public boolean contains(Point p) {
/**
* Checks if this envelope contains (covers) other envelope.
*
* @param env
* The envelope to be tested for coverage.
* @return TRUE if this envelope contains (covers) the specified envelope.
* @param env
* The envelope to be tested for coverage.
*
* @return {@code true} if this envelope contains (covers) the specified
* envelope.
*/
public boolean contains(Envelope env) {
return m_envelope.contains(env.m_envelope);
Expand Down
6 changes: 6 additions & 0 deletions src/main/java/com/esri/core/geometry/Envelope1D.java
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,12 @@ public boolean contains(double v) {
/**
* Returns True if the envelope contains the other envelope (boundary
* inclusive). Note: Will return false if either envelope is empty.
*
* @param other
* the envelope to be tested for coverage.
*
* @return {@code true} if this envelope contains (covers) the specified
* envelope.
*/
public boolean contains(/* const */Envelope1D other) /* const */
{
Expand Down
Loading