/[classpath]/classpath/java/awt/geom/Rectangle2D.java
ViewVC logotype

Diff of /classpath/java/awt/geom/Rectangle2D.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.4 by ericb, Thu Mar 21 09:12:38 2002 UTC revision 1.5 by ericb, Fri Mar 22 16:54:31 2002 UTC
# Line 513  public abstract class Rectangle2D extend Line 513  public abstract class Rectangle2D extend
513    public int hashCode()    public int hashCode()
514    {    {
515      // Talk about a fun time reverse engineering this one!      // Talk about a fun time reverse engineering this one!
516      long l = Double.doubleToLongBits(getX())      long l = java.lang.Double.doubleToLongBits(getX())
517        + 37 * Double.doubleToLongBits(getY())        + 37 * java.lang.Double.doubleToLongBits(getY())
518        + 43 * Double.doubleToLongBits(getWidth())        + 43 * java.lang.Double.doubleToLongBits(getWidth())
519        + 47 * Double.doubleToLongBits(getHeight());        + 47 * java.lang.Double.doubleToLongBits(getHeight());
520      return (int) ((l >> 32) ^ l);      return (int) ((l >> 32) ^ l);
521    }    }
522    
# Line 791  public abstract class Rectangle2D extend Line 791  public abstract class Rectangle2D extend
791      }      }
792    
793      /**      /**
794         * Create a rectangle with the given values.
795         *
796         * @param x the x coordinate
797         * @param y the y coordinate
798         * @param w the width
799         * @param h the height
800         */
801        Float(double x, double y, double w, double h)
802        {
803          this.x = (float) x;
804          this.y = (float) y;
805          width = (float) w;
806          height = (float) h;
807        }
808    
809        /**
810       * Return the X coordinate.       * Return the X coordinate.
811       *       *
812       * @return the value of x       * @return the value of x

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.5

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26