MCPcopy Create free account
hub / github.com/codenameone/CodenameOne / equals

Method equals

Ports/CLDC11/src/java/net/URI.java:806–843  ·  view source on GitHub ↗
(Object that)

Source from the content-addressed store, hash-verified

804 * @see java.lang.Object#equals(java.lang.Object)
805 */
806 @Override
807 public boolean equals(Object that) {
808 if (this == that) {
809 return true;
810 }
811 if (that == null) {
812 return false;
813 }
814 if (getClass() != that.getClass()) {
815 return false;
816 }
817 URI other = (URI) that;
818 // compare decoded fragment
819 if (fragment == null) {
820 if (other.fragment != null) {
821 return false;
822 }
823 } else if (!getFragment().equals(other.getFragment())) {
824 // the decoded value should be the same
825 return false;
826 }
827 if (scheme == null) {
828 if (other.scheme != null) {
829 return false;
830 }
831 } else if (!scheme.equals(other.scheme)) {
832 return false;
833 }
834 // compare decoded ssp
835 if (schemeSpecificPart == null) {
836 if (other.schemeSpecificPart != null) {
837 return false;
838 }
839 } else if (!getSchemeSpecificPart().equals(other.getSchemeSpecificPart())) {
840 return false;
841 }
842 return true;
843 }
844}

Callers

nothing calls this directly

Calls 4

getFragmentMethod · 0.95
getSchemeSpecificPartMethod · 0.95
equalsMethod · 0.65
getClassMethod · 0.45

Tested by

no test coverage detected