Extension SDK 10.1.2

oracle.ide.net
Class URLComparator

java.lang.Object
  extended byoracle.ide.net.URLComparator
All Implemented Interfaces:
java.util.Comparator

public final class URLComparator
extends java.lang.Object
implements java.util.Comparator

The URLComparator is an implementation of the Comparator interface that can be used for ordering URLs. The ordering is performed based on the Object.toString() representations of the URLs.


Constructor Summary
URLComparator()
          Creates a URLComparator that sorts URLs by their string form in a case-sensitive way.
URLComparator(boolean dirsBeforeFiles)
          Creates a URLComparator that sorts URLs by their string form using the case-sensitivity of the local file system.
URLComparator(boolean dirsBeforeFiles, boolean caseSensitive)
          Creates a URLComparator that sorts URLs by their string form using the specified case-sensitivity.
 
Method Summary
 int compare(java.lang.Object o1, java.lang.Object o2)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.Comparator
equals
 

Constructor Detail

URLComparator

public URLComparator()
Creates a URLComparator that sorts URLs by their string form in a case-sensitive way.


URLComparator

public URLComparator(boolean dirsBeforeFiles)
Creates a URLComparator that sorts URLs by their string form using the case-sensitivity of the local file system.

Parameters:
dirsBeforeFiles - If true, the URLComparator will sort directories before files. Otherwise, directories and files will be sorted together.

URLComparator

public URLComparator(boolean dirsBeforeFiles,
                     boolean caseSensitive)
Creates a URLComparator that sorts URLs by their string form using the specified case-sensitivity.

Parameters:
dirsBeforeFiles - If true, the URLComparator will sort directories before files. Otherwise, directories and files will be sorted together.
caseSensitive - If true, the URLComparator will sort URLs in a case-sensitive way. Otherwise sorting is case-insensitive.
Method Detail

compare

public int compare(java.lang.Object o1,
                   java.lang.Object o2)
Specified by:
compare in interface java.util.Comparator

Extension SDK

 

Copyright © 1997, 2004, Oracle. All rights reserved.