@Test public void testEquals() { CategoryLabelPositions p1 = new CategoryLabelPositions( new CategoryLabelPosition(RA_TOP, TextBlockAnchor.CENTER), new CategoryLabelPosition(RA_TOP, TextBlockAnchor.CENTER), new CategoryLabelPosition(RA_TOP, TextBlockAnchor.CENTER), new CategoryLabelPosition(RA_TOP, TextBlockAnchor.CENTER)); CategoryLabelPositions p2 = new CategoryLabelPositions( new CategoryLabelPosition(RA_TOP, TextBlockAnchor.CENTER), new CategoryLabelPosition(RA_TOP, TextBlockAnchor.CENTER), new CategoryLabelPosition(RA_TOP, TextBlockAnchor.CENTER), new CategoryLabelPosition(RA_TOP, TextBlockAnchor.CENTER)); assertEquals(p1, p2); p1 = new CategoryLabelPositions( new CategoryLabelPosition(RA_BOTTOM, TextBlockAnchor.TOP_CENTER), new CategoryLabelPosition(RA_TOP, TextBlockAnchor.CENTER), new CategoryLabelPosition(RA_TOP, TextBlockAnchor.CENTER), new CategoryLabelPosition(RA_TOP, TextBlockAnchor.CENTER)); assertFalse(p1.equals(p2)); p2 = new CategoryLabelPositions( new CategoryLabelPosition(RA_BOTTOM, TextBlockAnchor.TOP_CENTER), new CategoryLabelPosition(RA_TOP, TextBlockAnchor.CENTER), new CategoryLabelPosition(RA_TOP, TextBlockAnchor.CENTER), new CategoryLabelPosition(RA_TOP, TextBlockAnchor.CENTER)); assertEquals(p1, p2); p1 = new CategoryLabelPositions( new CategoryLabelPosition(RA_BOTTOM, TextBlockAnchor.TOP_CENTER), new CategoryLabelPosition(RA_BOTTOM, TextBlockAnchor.TOP_CENTER), new CategoryLabelPosition(RA_TOP, TextBlockAnchor.CENTER), new CategoryLabelPosition(RA_TOP, TextBlockAnchor.CENTER)); assertFalse(p1.equals(p2)); p2 = new CategoryLabelPositions( new CategoryLabelPosition(RA_BOTTOM, TextBlockAnchor.TOP_CENTER), new CategoryLabelPosition(RA_BOTTOM, TextBlockAnchor.TOP_CENTER), new CategoryLabelPosition(RA_TOP, TextBlockAnchor.CENTER), new CategoryLabelPosition(RA_TOP, TextBlockAnchor.CENTER)); assertEquals(p1, p2); p1 = new CategoryLabelPositions( new CategoryLabelPosition(RA_BOTTOM, TextBlockAnchor.TOP_CENTER), new CategoryLabelPosition(RA_BOTTOM, TextBlockAnchor.TOP_CENTER), new CategoryLabelPosition(RA_BOTTOM, TextBlockAnchor.TOP_CENTER), new CategoryLabelPosition(RA_TOP, TextBlockAnchor.CENTER)); assertFalse(p1.equals(p2)); p2 = new CategoryLabelPositions( new CategoryLabelPosition(RA_BOTTOM, TextBlockAnchor.TOP_CENTER), new CategoryLabelPosition(RA_BOTTOM, TextBlockAnchor.TOP_CENTER), new CategoryLabelPosition(RA_BOTTOM, TextBlockAnchor.TOP_CENTER), new CategoryLabelPosition(RA_TOP, TextBlockAnchor.CENTER)); assertEquals(p1, p2); p1 = new CategoryLabelPositions( new CategoryLabelPosition(RA_BOTTOM, TextBlockAnchor.TOP_CENTER), new CategoryLabelPosition(RA_BOTTOM, TextBlockAnchor.TOP_CENTER), new CategoryLabelPosition(RA_BOTTOM, TextBlockAnchor.TOP_CENTER), new CategoryLabelPosition(RA_BOTTOM, TextBlockAnchor.TOP_CENTER)); assertFalse(p1.equals(p2)); p2 = new CategoryLabelPositions( new CategoryLabelPosition(RA_BOTTOM, TextBlockAnchor.TOP_CENTER), new CategoryLabelPosition(RA_BOTTOM, TextBlockAnchor.TOP_CENTER), new CategoryLabelPosition(RA_BOTTOM, TextBlockAnchor.TOP_CENTER), new CategoryLabelPosition(RA_BOTTOM, TextBlockAnchor.TOP_CENTER)); assertEquals(p1, p2); }
@Override public boolean equals(Object obj) { if (this == obj) { return true; } if (!(obj instanceof CategoryLabelPositions)) { return false; } CategoryLabelPositions that = (CategoryLabelPositions) obj; if (!this.positionForAxisAtTop.equals(that.positionForAxisAtTop)) { return false; } if (!this.positionForAxisAtBottom.equals( that.positionForAxisAtBottom)) { return false; } if (!this.positionForAxisAtLeft.equals(that.positionForAxisAtLeft)) { return false; } if (!this.positionForAxisAtRight.equals(that.positionForAxisAtRight)) { return false; } return true; }
CategoryLabelPositions implements Serializable { @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (!(obj instanceof CategoryLabelPositions)) { return false; } CategoryLabelPositions that = (CategoryLabelPositions) obj; if (!this.positionForAxisAtTop.equals(that.positionForAxisAtTop)) { return false; } if (!this.positionForAxisAtBottom.equals( that.positionForAxisAtBottom)) { return false; } if (!this.positionForAxisAtLeft.equals(that.positionForAxisAtLeft)) { return false; } if (!this.positionForAxisAtRight.equals(that.positionForAxisAtRight)) { return false; } return true; } }
CategoryLabelPositions implements Serializable { @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (!(obj instanceof CategoryLabelPositions)) { return false; } CategoryLabelPositions that = (CategoryLabelPositions) obj; if (!this.positionForAxisAtTop.equals(that.positionForAxisAtTop)) { return false; } if (!this.positionForAxisAtBottom.equals( that.positionForAxisAtBottom)) { return false; } if (!this.positionForAxisAtLeft.equals(that.positionForAxisAtLeft)) { return false; } if (!this.positionForAxisAtRight.equals(that.positionForAxisAtRight)) { return false; } return true; } CategoryLabelPositions();  CategoryLabelPositions(CategoryLabelPosition top,
                                  CategoryLabelPosition bottom,
                                  CategoryLabelPosition left,
                                  CategoryLabelPosition right); }
CategoryLabelPositions implements Serializable { @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (!(obj instanceof CategoryLabelPositions)) { return false; } CategoryLabelPositions that = (CategoryLabelPositions) obj; if (!this.positionForAxisAtTop.equals(that.positionForAxisAtTop)) { return false; } if (!this.positionForAxisAtBottom.equals( that.positionForAxisAtBottom)) { return false; } if (!this.positionForAxisAtLeft.equals(that.positionForAxisAtLeft)) { return false; } if (!this.positionForAxisAtRight.equals(that.positionForAxisAtRight)) { return false; } return true; } CategoryLabelPositions();  CategoryLabelPositions(CategoryLabelPosition top,
                                  CategoryLabelPosition bottom,
                                  CategoryLabelPosition left,
                                  CategoryLabelPosition right); static CategoryLabelPositions createUpRotationLabelPositions(
            double angle); static CategoryLabelPositions createDownRotationLabelPositions(
            double angle); CategoryLabelPosition getLabelPosition(RectangleEdge edge); static CategoryLabelPositions replaceTopPosition(
            CategoryLabelPositions base, CategoryLabelPosition top); static CategoryLabelPositions replaceBottomPosition(
            CategoryLabelPositions base, CategoryLabelPosition bottom); static CategoryLabelPositions replaceLeftPosition(
            CategoryLabelPositions base, CategoryLabelPosition left); static CategoryLabelPositions replaceRightPosition(
            CategoryLabelPositions base, CategoryLabelPosition right); @Override boolean equals(Object obj); @Override int hashCode(); }
CategoryLabelPositions implements Serializable { @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (!(obj instanceof CategoryLabelPositions)) { return false; } CategoryLabelPositions that = (CategoryLabelPositions) obj; if (!this.positionForAxisAtTop.equals(that.positionForAxisAtTop)) { return false; } if (!this.positionForAxisAtBottom.equals( that.positionForAxisAtBottom)) { return false; } if (!this.positionForAxisAtLeft.equals(that.positionForAxisAtLeft)) { return false; } if (!this.positionForAxisAtRight.equals(that.positionForAxisAtRight)) { return false; } return true; } CategoryLabelPositions();  CategoryLabelPositions(CategoryLabelPosition top,
                                  CategoryLabelPosition bottom,
                                  CategoryLabelPosition left,
                                  CategoryLabelPosition right); static CategoryLabelPositions createUpRotationLabelPositions(
            double angle); static CategoryLabelPositions createDownRotationLabelPositions(
            double angle); CategoryLabelPosition getLabelPosition(RectangleEdge edge); static CategoryLabelPositions replaceTopPosition(
            CategoryLabelPositions base, CategoryLabelPosition top); static CategoryLabelPositions replaceBottomPosition(
            CategoryLabelPositions base, CategoryLabelPosition bottom); static CategoryLabelPositions replaceLeftPosition(
            CategoryLabelPositions base, CategoryLabelPosition left); static CategoryLabelPositions replaceRightPosition(
            CategoryLabelPositions base, CategoryLabelPosition right); @Override boolean equals(Object obj); @Override int hashCode(); static final CategoryLabelPositions STANDARD; static final CategoryLabelPositions UP_90; static final CategoryLabelPositions DOWN_90; static final CategoryLabelPositions UP_45; static final CategoryLabelPositions DOWN_45; }