/[classpath]/classpath/java/net/URI.java
ViewVC logotype

Diff of /classpath/java/net/URI.java

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

revision 1.6.2.9 by gnu_andrew, Tue Aug 2 20:12:23 2005 UTC revision 1.6.2.10 by tromey, Tue Sep 27 16:59:22 2005 UTC
# Line 156  import java.util.regex.Pattern; Line 156  import java.util.regex.Pattern;
156   * @since 1.4   * @since 1.4
157   */   */
158  public final class URI  public final class URI
159    implements Comparable, Serializable    implements Comparable<URI>, Serializable
160  {  {
161    /**    /**
162     * For serialization compatability.     * For serialization compatability.
# Line 1224  public final class URI Line 1224  public final class URI
1224    }    }
1225    
1226    /**    /**
1227     * Compare the URI with another object that must also be a URI.     * Compare the URI with another URI.
1228     * Undefined components are taken to be less than any other component.     * Undefined components are taken to be less than any other component.
1229     * The following criteria are observed:     * The following criteria are observed:
1230     * </p>     * </p>
# Line 1260  public final class URI Line 1260  public final class URI
1260     * </ul>     * </ul>
1261     * </ul>     * </ul>
1262     *     *
1263     * @param obj This object to compare this URI with     * @param uri The other URI to compare this URI with
1264     * @return a negative integer, zero or a positive integer depending     * @return a negative integer, zero or a positive integer depending
1265     *         on whether this URI is less than, equal to or greater     *         on whether this URI is less than, equal to or greater
1266     *         than that supplied, respectively.     *         than that supplied, respectively.
    * @throws ClassCastException if the given object is not a URI  
1267     */     */
1268    public int compareTo(Object obj)    public int compareTo(URI uri)
1269      throws ClassCastException      throws ClassCastException
1270    {    {
     URI uri = (URI) obj;  
1271      if (scheme == null && uri.getScheme() != null)      if (scheme == null && uri.getScheme() != null)
1272        return -1;        return -1;
1273      if (scheme != null)      if (scheme != null)

Legend:
Removed from v.1.6.2.9  
changed lines
  Added in v.1.6.2.10

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