Changeset 5967 for branches/cleanup


Ignore:
Timestamp:
02/26/10 10:56:31 (10 years ago)
Author:
callan
Message:

#466 TiffRational type safety adjustment

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/cleanup/components/bio-formats/src/loci/formats/tiff/TiffRational.java

    r5523 r5967  
    3333 * @author Curtis Rueden ctrueden at wisc.edu 
    3434 */ 
    35 public class TiffRational extends Number implements Comparable { 
     35public class TiffRational extends Number implements Comparable<TiffRational> { 
    3636 
    3737  // -- Fields -- 
     
    9999 
    100100  /** Indicates whether some other object is "equal to" this one. */ 
    101   public boolean equals(Object o) { 
     101  public boolean equals(TiffRational o) { 
    102102    return o != null && compareTo(o) == 0; 
    103103  } 
     
    116116   * is less than, equal to, or greater than the specified object. 
    117117   */ 
    118   public int compareTo(Object o) { 
    119     TiffRational q = (TiffRational) o; 
     118  public int compareTo(TiffRational q) { 
    120119    long diff = (numer * q.denom - q.numer * denom); 
    121120    if (diff > Integer.MAX_VALUE) diff = Integer.MAX_VALUE; 
Note: See TracChangeset for help on using the changeset viewer.