FileDocCategorySizeDatePackage
CommonStringComparator.javaAPI DocphoneME MR2 API (J2ME)2354Wed May 02 18:00:46 BST 2007com.sun.j2me.global

CommonStringComparator

public interface CommonStringComparator
The CommonStringComparator interface defines methods for string comparison that {@link javax.microedition.global.StringComparator} realization classes must implement.

Fields Summary
Constructors Summary
Methods Summary
public intcompare(java.lang.String s1, java.lang.String s2)
Compares the two strings using the rules specific to the associated locale of this instance. Use the equals method to more conveniently test for equality.

param
s1 first string to compare
param
s2 second string to compare
return
negative if s1 belongs before s2, zero if the strings are equal, positive if s1 belongs after s2
throws
NullPointerException if either s1 or s2 is null
see
#equals(String, String)

public booleanequals(java.lang.String s1, java.lang.String s2)
Tests if the two strings are equal according to the rules specific to the associated locale of this instance.

param
s1 first string to compare
param
s2 second string to compare
return
true if the strings are equal, false if not
throws
NullPointerException if either s1 or s2 is null