Created
July 27, 2020 07:00
-
-
Save doom369/929eddd9a04b8175e2075aca3f194000 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public boolean equals(Object anObject) { | |
if (this == anObject) { | |
return true; | |
} | |
if (anObject instanceof String) { | |
String aString = (String)anObject; | |
if (coder() == aString.coder()) { | |
return isLatin1() ? StringLatin1.equals(value, aString.value) | |
: StringUTF16.equals(value, aString.value); | |
} | |
} | |
return false; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment