Loading graphics/java/android/graphics/Matrix.java +29 −13 Original line number Diff line number Diff line Loading @@ -270,10 +270,20 @@ public class Matrix { /** Returns true iff obj is a Matrix and its values equal our values. */ @Override public boolean equals(Object obj) { return obj != null && obj instanceof Matrix && native_equals(native_instance, ((Matrix)obj).native_instance); //if (obj == this) return true; -- NaN value would mean matrix != itself if (!(obj instanceof Matrix)) return false; return native_equals(native_instance, ((Matrix)obj).native_instance); } @Override public int hashCode() { // This should generate the hash code by performing some arithmetic operation on all // the matrix elements -- our equals() does an element-by-element comparison, and we // need to ensure that the hash code for two equal objects is the same. We're not // really using this at the moment, so we take the easy way out. return 44; } /** Set the matrix to identity */ Loading Loading @@ -736,6 +746,7 @@ public class Matrix { native_setValues(native_instance, values); } @Override public String toString() { StringBuilder sb = new StringBuilder(64); sb.append("Matrix{"); Loading Loading @@ -783,8 +794,13 @@ public class Matrix { } @Override protected void finalize() throws Throwable { try { finalizer(native_instance); } finally { super.finalize(); } } /*package*/ final int ni() { Loading Loading
graphics/java/android/graphics/Matrix.java +29 −13 Original line number Diff line number Diff line Loading @@ -270,10 +270,20 @@ public class Matrix { /** Returns true iff obj is a Matrix and its values equal our values. */ @Override public boolean equals(Object obj) { return obj != null && obj instanceof Matrix && native_equals(native_instance, ((Matrix)obj).native_instance); //if (obj == this) return true; -- NaN value would mean matrix != itself if (!(obj instanceof Matrix)) return false; return native_equals(native_instance, ((Matrix)obj).native_instance); } @Override public int hashCode() { // This should generate the hash code by performing some arithmetic operation on all // the matrix elements -- our equals() does an element-by-element comparison, and we // need to ensure that the hash code for two equal objects is the same. We're not // really using this at the moment, so we take the easy way out. return 44; } /** Set the matrix to identity */ Loading Loading @@ -736,6 +746,7 @@ public class Matrix { native_setValues(native_instance, values); } @Override public String toString() { StringBuilder sb = new StringBuilder(64); sb.append("Matrix{"); Loading Loading @@ -783,8 +794,13 @@ public class Matrix { } @Override protected void finalize() throws Throwable { try { finalizer(native_instance); } finally { super.finalize(); } } /*package*/ final int ni() { Loading