11/*
2- Copyright 1995-2015 Esri
2+ Copyright 1995-2018 Esri
33
44 Licensed under the Apache License, Version 2.0 (the "License");
55 you may not use this file except in compliance with the License.
@@ -131,6 +131,7 @@ public Envelope2D getInflated(double dx, double dy) {
131131 /**
132132 * Sets the envelope from the array of points. The envelope will be set to
133133 * empty if the array is null.
134+ * @param points The points to set the envelope from. No element in the array can be null.
134135 */
135136 public void setFromPoints (Point2D [] points ) {
136137 if (points == null || points .length == 0 ) {
@@ -198,6 +199,8 @@ else if (ymax < y)
198199 /**
199200 * Merges a point with this envelope without checking if the envelope is
200201 * empty. Use with care.
202+ * @param x The x coord of the point
203+ * @param y the y coord in the point
201204 */
202205 public void mergeNE (double x , double y ) {
203206 if (xmin > x )
@@ -258,6 +261,7 @@ public void zoom(double factorX, double factorY) {
258261
259262 /**
260263 * Checks if this envelope intersects the other.
264+ * @param other The other envelope.
261265 * @return True if this envelope intersects the other.
262266 */
263267 public boolean isIntersecting (Envelope2D other ) {
@@ -274,6 +278,7 @@ public boolean isIntersecting(Envelope2D other) {
274278
275279 /**
276280 * Checks if this envelope intersects the other assuming neither one is empty.
281+ * @param other The other envelope.
277282 * @return True if this envelope intersects the other. Assumes this and
278283 * other envelopes are not empty.
279284 */
@@ -289,6 +294,10 @@ public boolean isIntersectingNE(Envelope2D other) {
289294
290295 /**
291296 * Checks if this envelope intersects the other.
297+ * @param xmin_
298+ * @param ymin_
299+ * @param xmax_
300+ * @param ymax_
292301 * @return True if this envelope intersects the other.
293302 */
294303 public boolean isIntersecting (double xmin_ , double ymin_ , double xmax_ , double ymax_ ) {
@@ -307,7 +316,7 @@ public boolean isIntersecting(double xmin_, double ymin_, double xmax_, double y
307316 /**
308317 * Intersects this envelope with the other and stores result in this
309318 * envelope.
310- *
319+ * @param other The other envelope.
311320 * @return True if this envelope intersects the other, otherwise sets this
312321 * envelope to empty state and returns False.
313322 */
@@ -370,6 +379,7 @@ public Point2D queryCorner(int index) {
370379 /**
371380 * Queries corners into a given array. The array length must be at least
372381 * 4. Starts from the lower left corner and goes clockwise.
382+ * @param corners The array of four points.
373383 */
374384 public void queryCorners (Point2D [] corners ) {
375385 if ((corners == null ) || (corners .length < 4 ))
@@ -399,6 +409,7 @@ public void queryCorners(Point2D[] corners) {
399409 * Queries corners into a given array in reversed order. The array length
400410 * must be at least 4. Starts from the lower left corner and goes
401411 * counterclockwise.
412+ * @param corners The array of four points.
402413 */
403414 public void queryCornersReversed (Point2D [] corners ) {
404415 if (corners == null || ((corners != null ) && (corners .length < 4 )))
@@ -500,6 +511,8 @@ public double getHeight() {
500511
501512 /**
502513 * Moves the Envelope by given distance.
514+ * @param dx
515+ * @param dy
503516 */
504517 public void move (double dx , double dy ) {
505518 if (isEmpty ())
@@ -558,6 +571,7 @@ public void queryUpperRight(Point2D pt) {
558571 /**
559572 * Returns True if this envelope is valid (empty, or has xmin less or equal
560573 * to xmax, or ymin less or equal to ymax).
574+ * @return True if the envelope is valid.
561575 */
562576 public boolean isValid () {
563577 return isEmpty () || (xmin <= xmax && ymin <= ymax );
@@ -621,6 +635,8 @@ public boolean contains(double x, double y) {
621635 /**
622636 * Returns True if the envelope contains the other envelope (boundary
623637 * inclusive).
638+ * @param other The other envelope.
639+ * @return True if this contains the other.
624640 */
625641 public boolean contains (Envelope2D other ) {// Note: Will return False, if
626642 // either envelope is empty.
@@ -630,7 +646,10 @@ public boolean contains(Envelope2D other) {// Note: Will return False, if
630646
631647 /**
632648 * Returns True if the envelope contains the point (boundary exclusive).
633- */
649+ * @param x
650+ * @param y
651+ * @return True if this contains the point.
652+ * */
634653 public boolean containsExclusive (double x , double y ) {
635654 // Note: This will return False, if envelope is empty, thus no need to
636655 // call is_empty().
@@ -647,6 +666,8 @@ public boolean containsExclusive(Point2D pt) {
647666 /**
648667 * Returns True if the envelope contains the other envelope (boundary
649668 * exclusive).
669+ * @param other The other envelope
670+ * @return True if this contains the other, boundary exclusive.
650671 */
651672 boolean containsExclusive (Envelope2D other ) {
652673 // Note: This will return False, if either envelope is empty, thus no
@@ -1075,15 +1096,19 @@ public boolean isPointOnBoundary(Point2D pt, double tolerance) {
10751096 /**
10761097 * Calculates minimum distance from this envelope to the other.
10771098 * Returns 0 for empty envelopes.
1099+ * @param other The other envelope.
1100+ * @return Returns the distance
10781101 */
1079- public double distance (/* const */ Envelope2D other )
1102+ public double distance (Envelope2D other )
10801103 {
10811104 return Math .sqrt (sqrDistance (other ));
10821105 }
10831106
10841107 /**
10851108 * Calculates minimum distance from this envelope to the point.
10861109 * Returns 0 for empty envelopes.
1110+ * @param pt2D The other point.
1111+ * @return Returns the distance
10871112 */
10881113 public double distance (Point2D pt2D )
10891114 {
@@ -1093,6 +1118,8 @@ public double distance(Point2D pt2D)
10931118 /**
10941119 * Calculates minimum squared distance from this envelope to the other.
10951120 * Returns 0 for empty envelopes.
1121+ * @param other The other envelope.
1122+ * @return Returns the squared distance
10961123 */
10971124 public double sqrDistance (Envelope2D other )
10981125 {
@@ -1122,6 +1149,11 @@ public double sqrDistance(Envelope2D other)
11221149 /**
11231150 * Calculates minimum squared distance from this envelope to the other.
11241151 * Returns 0 for empty envelopes.
1152+ * @param xmin_
1153+ * @param ymin_
1154+ * @param xmax_
1155+ * @param ymax_
1156+ * @return Returns the squared distance.
11251157 */
11261158 public double sqrDistance (double xmin_ , double ymin_ , double xmax_ , double ymax_ )
11271159 {
@@ -1178,6 +1210,8 @@ public double sqrMaxDistance(Envelope2D other) {
11781210 /**
11791211 * Calculates minimum squared distance from this envelope to the point.
11801212 * Returns 0 for empty envelopes.
1213+ * @param pt2D The point.
1214+ * @return Returns the squared distance
11811215 */
11821216 public double sqrDistance (Point2D pt2D )
11831217 {
0 commit comments