60 |
* @author Aaron M. Renn (arenn@urbanophile.com) |
* @author Aaron M. Renn (arenn@urbanophile.com) |
61 |
* @author Tom Tromey (tromey@cygnus.com) |
* @author Tom Tromey (tromey@cygnus.com) |
62 |
*/ |
*/ |
63 |
public class File implements Serializable, Comparable |
public class File implements Serializable, Comparable<File> |
64 |
{ |
{ |
65 |
private static final long serialVersionUID = 301077366599181567L; |
private static final long serialVersionUID = 301077366599181567L; |
66 |
|
|
1226 |
} |
} |
1227 |
|
|
1228 |
/** |
/** |
|
* This method compares the specified <code>Object</code> to this one |
|
|
* to test for equality. It does this by comparing the canonical path names |
|
|
* of the files. This method is identical to <code>compareTo(File)</code> |
|
|
* except that if the <code>Object</code> passed to it is not a |
|
|
* <code>File</code>, it throws a <code>ClassCastException</code> |
|
|
* <p> |
|
|
* The canonical paths of the files are determined by calling the |
|
|
* <code>getCanonicalPath</code> method on each object. |
|
|
* <p> |
|
|
* This method returns a 0 if the specified <code>Object</code> is equal |
|
|
* to this one, a negative value if it is less than this one |
|
|
* a positive value if it is greater than this one. |
|
|
* |
|
|
* @return An integer as described above |
|
|
* |
|
|
* @exception ClassCastException If the passed <code>Object</code> is |
|
|
* not a <code>File</code> |
|
|
* |
|
|
* @since 1.2 |
|
|
*/ |
|
|
public int compareTo(Object obj) |
|
|
{ |
|
|
return compareTo((File) obj); |
|
|
} |
|
|
|
|
|
/** |
|
1229 |
* This method renames the file represented by this object to the path |
* This method renames the file represented by this object to the path |
1230 |
* of the file represented by the argument <code>File</code>. |
* of the file represented by the argument <code>File</code>. |
1231 |
* |
* |