home *** CD-ROM | disk | FTP | other *** search
/ Sky at Night 2007 June / SAN CD 6-2007 CD-ROM 25.iso / pc / Software / AstroGrav_Win / Java / jre1.6.0 / lib / rt.jar / java / text / FieldPosition.class (.txt) < prev    next >
Encoding:
Java Class File  |  2006-11-29  |  2.3 KB  |  105 lines

  1. package java.text;
  2.  
  3. public class FieldPosition {
  4.    int field;
  5.    int endIndex;
  6.    int beginIndex;
  7.    private Format.Field attribute;
  8.  
  9.    public FieldPosition(int var1) {
  10.       this.field = 0;
  11.       this.endIndex = 0;
  12.       this.beginIndex = 0;
  13.       this.field = var1;
  14.    }
  15.  
  16.    public FieldPosition(Format.Field var1) {
  17.       this(var1, -1);
  18.    }
  19.  
  20.    public FieldPosition(Format.Field var1, int var2) {
  21.       this.field = 0;
  22.       this.endIndex = 0;
  23.       this.beginIndex = 0;
  24.       this.attribute = var1;
  25.       this.field = var2;
  26.    }
  27.  
  28.    public Format.Field getFieldAttribute() {
  29.       return this.attribute;
  30.    }
  31.  
  32.    public int getField() {
  33.       return this.field;
  34.    }
  35.  
  36.    public int getBeginIndex() {
  37.       return this.beginIndex;
  38.    }
  39.  
  40.    public int getEndIndex() {
  41.       return this.endIndex;
  42.    }
  43.  
  44.    public void setBeginIndex(int var1) {
  45.       this.beginIndex = var1;
  46.    }
  47.  
  48.    public void setEndIndex(int var1) {
  49.       this.endIndex = var1;
  50.    }
  51.  
  52.    Format.FieldDelegate getFieldDelegate() {
  53.       return new Delegate(this, (1)null);
  54.    }
  55.  
  56.    public boolean equals(Object var1) {
  57.       if (var1 == null) {
  58.          return false;
  59.       } else if (!(var1 instanceof FieldPosition)) {
  60.          return false;
  61.       } else {
  62.          FieldPosition var2 = (FieldPosition)var1;
  63.          if (this.attribute == null) {
  64.             if (var2.attribute != null) {
  65.                return false;
  66.             }
  67.          } else if (!this.attribute.equals(var2.attribute)) {
  68.             return false;
  69.          }
  70.  
  71.          return this.beginIndex == var2.beginIndex && this.endIndex == var2.endIndex && this.field == var2.field;
  72.       }
  73.    }
  74.  
  75.    public int hashCode() {
  76.       return this.field << 24 | this.beginIndex << 16 | this.endIndex;
  77.    }
  78.  
  79.    public String toString() {
  80.       return this.getClass().getName() + "[field=" + this.field + ",attribute=" + this.attribute + ",beginIndex=" + this.beginIndex + ",endIndex=" + this.endIndex + ']';
  81.    }
  82.  
  83.    private boolean matchesField(Format.Field var1) {
  84.       return this.attribute != null ? this.attribute.equals(var1) : false;
  85.    }
  86.  
  87.    private boolean matchesField(Format.Field var1, int var2) {
  88.       if (this.attribute != null) {
  89.          return this.attribute.equals(var1);
  90.       } else {
  91.          return var2 == this.field;
  92.       }
  93.    }
  94.  
  95.    // $FF: synthetic method
  96.    static boolean access$100(FieldPosition var0, Format.Field var1) {
  97.       return var0.matchesField(var1);
  98.    }
  99.  
  100.    // $FF: synthetic method
  101.    static boolean access$200(FieldPosition var0, Format.Field var1, int var2) {
  102.       return var0.matchesField(var1, var2);
  103.    }
  104. }
  105.