|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjade.core.CaseInsensitiveString
public class CaseInsensitiveString
A name string, with case insensitive comparison and equality operations.
This class holds a String inside, preserving the case; however,
all the equality and comparision operations are performed in a case
insensitive fashion.
| Constructor Summary | |
|---|---|
CaseInsensitiveString(java.lang.String name)
Create a new CaseInsensitiveString object. |
|
| Method Summary | |
|---|---|
boolean |
equals(java.lang.Object o)
Equality operation. |
static boolean |
equalsIgnoreCase(java.lang.String s1,
java.lang.String s2)
Static method for case insensitive string comparasion. |
int |
hashCode()
Hash code. |
java.lang.String |
toString()
Converts the CaseInsensitiveString object into a
string. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public CaseInsensitiveString(java.lang.String name)
CaseInsensitiveString object.
name - The string that will be kept inside this object.| Method Detail |
|---|
public final java.lang.String toString()
CaseInsensitiveString object into a
string.
toString in class java.lang.Objectpublic final boolean equals(java.lang.Object o)
CaseInsensitiveString object with another or with
a Java String. The comparison is case insensitive.
equals in class java.lang.Objecto - The Java object to compare this
CaseInsensitiveString to.
true if the strings contained within the two objects
are equal, apart from case.public final int hashCode()
CaseInsensitiveString objects differing only
in case have the same hash code.
hashCode in class java.lang.ObjectCaseInsensitiveString object.
public static final boolean equalsIgnoreCase(java.lang.String s1,
java.lang.String s2)
s1, - s2 The String objects to compare
true if the strings are equal, apart from case.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||