src/java.desktop/share/classes/java/awt/Rectangle.java

Print this page

        

@@ -47,14 +47,14 @@
  * a point or rectangle will always return false if either dimension is zero.
  * Methods which combine such a {@code Rectangle} with a point or rectangle
  * will include the location of the {@code Rectangle} on that axis in the
  * result as if the {@link #add(Point)} method were being called.
  * <p>
- * <a name="NonExistant">
+ * <a name="NonExistent">
  * A {@code Rectangle} whose width or height is negative has neither
  * location nor dimension along those axes with negative dimensions.
- * Such a {@code Rectangle} is treated as non-existant along those axes.
+ * Such a {@code Rectangle} is treated as non-existent along those axes.
  * Such a {@code Rectangle} is also empty with respect to containment
  * calculations and methods which test if it contains or intersects a
  * point or rectangle will always return false.
  * Methods which combine such a {@code Rectangle} with a point or rectangle
  * will ignore the {@code Rectangle} entirely in generating the result.

@@ -104,11 +104,11 @@
  * Generally this means that the dimension will be clipped independently
  * to the range of 32-bit integers except that if the location had to be
  * moved to store it into its pair of 32-bit fields then the dimensions
  * will be adjusted relative to the "best representation" of the location.
  * If the true result had a negative dimension and was therefore
- * non-existant along one or both axes, the stored dimensions will be
+ * non-existent along one or both axes, the stored dimensions will be
  * negative numbers in those axes.
  * If the true result had a location that could be represented within
  * the range of 32-bit integers, but zero dimension along one or both
  * axes, then the stored dimensions will be zero in those axes.
  *

@@ -379,11 +379,11 @@
         if (x > 2.0 * Integer.MAX_VALUE) {
             // Too far in positive X direction to represent...
             // We cannot even reach the left side of the specified
             // rectangle even with both x & width set to MAX_VALUE.
             // The intersection with the "maximal integer rectangle"
-            // is non-existant so we should use a width < 0.
+            // is non-existent so we should use a width < 0.
             // REMIND: Should we try to determine a more "meaningful"
             // adjusted value for neww than just "-1"?
             newx = Integer.MAX_VALUE;
             neww = -1;
         } else {

@@ -843,11 +843,11 @@
      * specified <code>Rectangle</code>. Returns a new
      * <code>Rectangle</code> that
      * represents the union of the two rectangles.
      * <p>
      * If either {@code Rectangle} has any dimension less than zero
-     * the rules for <a href=#NonExistant>non-existant</a> rectangles
+     * the rules for <a href=#NonExistent>non-existent</a> rectangles
      * apply.
      * If only one has a dimension less than zero, then the result
      * will be a copy of the other {@code Rectangle}.
      * If both have dimension less than zero, then the result will
      * have at least one dimension less than zero.

@@ -865,12 +865,12 @@
         long tx2 = this.width;
         long ty2 = this.height;
         if ((tx2 | ty2) < 0) {
             // This rectangle has negative dimensions...
             // If r has non-negative dimensions then it is the answer.
-            // If r is non-existant (has a negative dimension), then both
-            // are non-existant and we can return any non-existant rectangle
+            // If r is non-existent (has a negative dimension), then both
+            // are non-existent and we can return any non-existent rectangle
             // as an answer.  Thus, returning r meets that criterion.
             // Either way, r is our answer.
             return new Rectangle(r);
         }
         long rx2 = r.width;

@@ -903,11 +903,11 @@
     /**
      * Adds a point, specified by the integer arguments {@code newx,newy}
      * to the bounds of this {@code Rectangle}.
      * <p>
      * If this {@code Rectangle} has any dimension less than zero,
-     * the rules for <a href=#NonExistant>non-existant</a>
+     * the rules for <a href=#NonExistent>non-existent</a>
      * rectangles apply.
      * In that case, the new bounds of this {@code Rectangle} will
      * have a location equal to the specified coordinates and
      * width and height equal to zero.
      * <p>

@@ -954,11 +954,11 @@
     /**
      * Adds the specified {@code Point} to the bounds of this
      * {@code Rectangle}.
      * <p>
      * If this {@code Rectangle} has any dimension less than zero,
-     * the rules for <a href=#NonExistant>non-existant</a>
+     * the rules for <a href=#NonExistent>non-existent</a>
      * rectangles apply.
      * In that case, the new bounds of this {@code Rectangle} will
      * have a location equal to the coordinates of the specified
      * {@code Point} and width and height equal to zero.
      * <p>

@@ -1073,11 +1073,11 @@
         y0 -= v;
         x1 += h;
         y1 += v;
 
         if (x1 < x0) {
-            // Non-existant in X direction
+            // Non-existent in X direction
             // Final width must remain negative so subtract x0 before
             // it is clipped so that we avoid the risk that the clipping
             // of x0 will reverse the ordering of x0 and x1.
             x1 -= x0;
             if (x1 < Integer.MIN_VALUE) x1 = Integer.MIN_VALUE;

@@ -1096,11 +1096,11 @@
             if (x1 < Integer.MIN_VALUE) x1 = Integer.MIN_VALUE;
             else if (x1 > Integer.MAX_VALUE) x1 = Integer.MAX_VALUE;
         }
 
         if (y1 < y0) {
-            // Non-existant in Y direction
+            // Non-existent in Y direction
             y1 -= y0;
             if (y1 < Integer.MIN_VALUE) y1 = Integer.MIN_VALUE;
             if (y0 < Integer.MIN_VALUE) y0 = Integer.MIN_VALUE;
             else if (y0 > Integer.MAX_VALUE) y0 = Integer.MAX_VALUE;
         } else { // (y1 >= y0)