Rectangle2 implements Cloneable, Savable, Externalizable, ReadOnlyRectangle2, Poolable { @Override public Rectangle2 clone() { return new Rectangle2(this); } Rectangle2();  Rectangle2(final int x, final int y, final int width, final int height);  Rectangle2(final ReadOnlyRectangle2 source); @Override int getX(); void setX(final int x); @Override int getY(); void setY(final int y); @Override int getWidth(); void setWidth(final int width); @Override int getHeight(); void setHeight(final int height); Rectangle2 set(final int x, final int y, final int width, final int height); Rectangle2 set(final ReadOnlyRectangle2 rect); Rectangle2 intersect(final ReadOnlyRectangle2 other, final Rectangle2 store); static Rectangle2 intersect(final ReadOnlyRectangle2 src1, final ReadOnlyRectangle2 src2,
      final Rectangle2 store); @Override String toString(); @Override int hashCode(); @Override boolean equals(final Object o); @Override Rectangle2 clone(); @Override void write(final OutputCapsule capsule); @Override void read(final InputCapsule capsule); @Override Class<? extends Rectangle2> getClassTag(); @Override void readExternal(final ObjectInput in); @Override void writeExternal(final ObjectOutput out); final static Rectangle2 fetchTempInstance(); final static void releaseTempInstance(final Rectangle2 rectangle);  }
@Test public void testClone() { final Rectangle2 rect1 = new Rectangle2(); final Rectangle2 rect2 = rect1.clone(); assertEquals(rect1, rect2); assertNotSame(rect1, rect2); }