AltRectF.java 1.8 KB

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