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

Method equals

vm/JavaAPI/src/java/net/URI.java:931–968  ·  view source on GitHub ↗
(Object that)

Source from the content-addressed store, hash-verified

929 * @see java.lang.Object#equals(java.lang.Object)
930 */
931 @Override
932 public boolean equals(Object that) {
933 if (this == that) {
934 return true;
935 }
936 if (that == null) {
937 return false;
938 }
939 if (getClass() != that.getClass()) {
940 return false;
941 }
942 URI other = (URI) that;
943 // compare decoded fragment
944 if (fragment == null) {
945 if (other.fragment != null) {
946 return false;
947 }
948 } else if (!getFragment().equals(other.getFragment())) {
949 // the decoded value should be the same
950 return false;
951 }
952 if (scheme == null) {
953 if (other.scheme != null) {
954 return false;
955 }
956 } else if (!scheme.equals(other.scheme)) {
957 return false;
958 }
959 // compare decoded ssp
960 if (schemeSpecificPart == null) {
961 if (other.schemeSpecificPart != null) {
962 return false;
963 }
964 } else if (!getSchemeSpecificPart().equals(other.getSchemeSpecificPart())) {
965 return false;
966 }
967 return true;
968 }
969}

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