MCPcopy Index your code
hub / github.com/clojure/clojure / equals

Method equals

src/jvm/clojure/asm/Type.java:853–879  ·  view source on GitHub ↗

Tests if the given object is equal to this type. @param object the object to be compared to this type. @return true if the given object is equal to this type.

(final Object object)

Source from the content-addressed store, hash-verified

851 * @return <tt>true</tt> if the given object is equal to this type.
852 */
853 @Override
854 public boolean equals(final Object object) {
855 if (this == object) {
856 return true;
857 }
858 if (!(object instanceof Type)) {
859 return false;
860 }
861 Type other = (Type) object;
862 if ((sort == INTERNAL ? OBJECT : sort) != (other.sort == INTERNAL ? OBJECT : other.sort)) {
863 return false;
864 }
865 int begin = valueBegin;
866 int end = valueEnd;
867 int otherBegin = other.valueBegin;
868 int otherEnd = other.valueEnd;
869 // Compare the values.
870 if (end - begin != otherEnd - otherBegin) {
871 return false;
872 }
873 for (int i = begin, j = otherBegin; i < end; i++, j++) {
874 if (valueBuffer.charAt(i) != other.valueBuffer.charAt(j)) {
875 return false;
876 }
877 }
878 return true;
879 }
880
881 /**
882 * Returns a hash code value for this type.

Callers 15

containsMethod · 0.45
MethodWriterMethod · 0.45
SymbolTableMethod · 0.45
addConstantUtf8Method · 0.45
addTypeMethod · 0.45
addUninitializedTypeMethod · 0.45
ClassReaderMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected