home *** CD-ROM | disk | FTP | other *** search
/ S283 Planetary Science &n…he Search for Life DVD 2 / DVD-ROM.iso / install / jre1_3 / lib / rt.jar / java / awt / Insets.class (.txt) < prev    next >
Encoding:
Java Class File  |  1979-12-31  |  1.3 KB  |  56 lines

  1. package java.awt;
  2.  
  3. import java.io.Serializable;
  4.  
  5. public class Insets implements Cloneable, Serializable {
  6.    public int top;
  7.    public int left;
  8.    public int bottom;
  9.    public int right;
  10.    private static final long serialVersionUID = -2272572637695466749L;
  11.  
  12.    public Insets(int var1, int var2, int var3, int var4) {
  13.       this.top = var1;
  14.       this.left = var2;
  15.       this.bottom = var3;
  16.       this.right = var4;
  17.    }
  18.  
  19.    public boolean equals(Object var1) {
  20.       if (!(var1 instanceof Insets)) {
  21.          return false;
  22.       } else {
  23.          Insets var2 = (Insets)var1;
  24.          return this.top == var2.top && this.left == var2.left && this.bottom == var2.bottom && this.right == var2.right;
  25.       }
  26.    }
  27.  
  28.    public int hashCode() {
  29.       int var1 = this.left + this.bottom;
  30.       int var2 = this.right + this.top;
  31.       int var3 = var1 * (var1 + 1) / 2 + this.left;
  32.       int var4 = var2 * (var2 + 1) / 2 + this.top;
  33.       int var5 = var3 + var4;
  34.       return var5 * (var5 + 1) / 2 + var4;
  35.    }
  36.  
  37.    public String toString() {
  38.       return this.getClass().getName() + "[top=" + this.top + ",left=" + this.left + ",bottom=" + this.bottom + ",right=" + this.right + "]";
  39.    }
  40.  
  41.    public Object clone() {
  42.       try {
  43.          return super.clone();
  44.       } catch (CloneNotSupportedException var2) {
  45.          throw new InternalError();
  46.       }
  47.    }
  48.  
  49.    private static native void initIDs();
  50.  
  51.    static {
  52.       Toolkit.loadLibraries();
  53.       initIDs();
  54.    }
  55. }
  56.