/** * Returns a {@link Shape} object from the list. * * @param index the index (zero-based). * * @return The object. */ public Shape getShape(final int index) { return (Shape) get(index); }
/** * Returns a {@link Shape} object from the list. * * @param index the index (zero-based). * * @return The object. */ public Shape getShape(final int index) { return (Shape) get(index); }
/** * Returns a {@link Shape} object from the list. * * @param index the index (zero-based). * * @return The object. */ public Shape getShape(final int index) { return (Shape) get(index); }
/** * Tests the list for equality with another object (typically also a list). * * @param obj the other object (<code>null</code> permitted). * * @return A boolean. */ public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof ShapeList)) { return false; } ShapeList that = (ShapeList) obj; int listSize = size(); for (int i = 0; i < listSize; i++) { if (!ShapeUtilities.equal((Shape) get(i), (Shape) that.get(i))) { return false; } } return true; }
/** * Tests the list for equality with another object (typically also a list). * * @param obj the other object (<code>null</code> permitted). * * @return A boolean. */ public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof ShapeList)) { return false; } ShapeList that = (ShapeList) obj; int listSize = size(); for (int i = 0; i < listSize; i++) { if (!ShapeUtilities.equal((Shape) get(i), (Shape) that.get(i))) { return false; } } return true; }