FileDocCategorySizeDatePackage
SubstringComparator.javaAPI DocExample389Sat Aug 07 20:48:04 BST 1999None

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.substring(1).equals(o2.substring(1));