FileDocCategorySizeDatePackage
SubstringComparator.javaAPI DocExample431Sun Jun 20 22:09:08 BST 2004None

SubstringComparator

public class SubstringComparator extends Object implements Comparator
Comparator for comparing strings ignoring first character.
version
$id$

Fields Summary
Constructors Summary
Methods Summary
public intcompare(java.lang.Object o1, java.lang.Object o2)

		String s1 = o1.toString().substring(1);
		String s2 = o2.toString().substring(1);
		return s1.compareTo(s2);
		// or, more concisely:
		// return o1.toString().substring(1).equals(o2.toString().substring(1));