AltRectF.java 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. package epson.print.phlayout;
  2. import android.graphics.RectF;
  3. import android.support.annotation.NonNull;
  4. public class AltRectF {
  5. float bottom;
  6. float left;
  7. float right;
  8. float top;
  9. public AltRectF() {
  10. }
  11. public AltRectF(@NonNull AltRect altRect) {
  12. this.left = (float) altRect.left;
  13. this.top = (float) altRect.top;
  14. this.right = (float) altRect.right;
  15. this.bottom = (float) altRect.bottom;
  16. }
  17. public AltRectF(float f, float f2, float f3, float f4) {
  18. this.left = f;
  19. this.top = f2;
  20. this.right = f3;
  21. this.bottom = f4;
  22. }
  23. private RectF getRectF() {
  24. return new RectF(this.left, this.top, this.right, this.bottom);
  25. }
  26. /* access modifiers changed from: package-private */
  27. @VisibleForTesting
  28. public int[] getIntVal() {
  29. return new int[]{(int) this.left, (int) this.top, (int) this.right, (int) this.bottom};
  30. }
  31. public boolean equals(Object obj) {
  32. if (this == obj) {
  33. return true;
  34. }
  35. if (obj == null || getClass() != obj.getClass()) {
  36. return false;
  37. }
  38. AltRectF altRectF = (AltRectF) obj;
  39. if (this.left == altRectF.left && this.top == altRectF.top && this.right == altRectF.right && this.bottom == altRectF.bottom) {
  40. return true;
  41. }
  42. return false;
  43. }
  44. public int hashCode() {
  45. return (int) (((float) (((int) (((float) (((int) (((float) (((int) this.left) * 31)) + this.top)) * 31)) + this.right)) * 31)) + this.bottom);
  46. }
  47. public String toString() {
  48. StringBuilder sb = new StringBuilder(32);
  49. sb.append("AltRectF(");
  50. sb.append(this.left);
  51. sb.append(PreferencesConstants.COOKIE_DELIMITER);
  52. sb.append(this.top);
  53. sb.append(PreferencesConstants.COOKIE_DELIMITER);
  54. sb.append(this.right);
  55. sb.append(PreferencesConstants.COOKIE_DELIMITER);
  56. sb.append(this.bottom);
  57. sb.append(")");
  58. return sb.toString();
  59. }
  60. }