Class ShapeList

All Implemented Interfaces:
Serializable, Cloneable

public class ShapeList extends AbstractObjectList
A table of Shape objects.
See Also:
  • Constructor Details

    • ShapeList

      public ShapeList()
      Creates a new list.
  • Method Details

    • getShape

      public Shape getShape(int index)
      Returns a Shape object from the list.
      Parameters:
      index - the index (zero-based).
      Returns:
      The object.
    • setShape

      public void setShape(int index, Shape shape)
      Sets the Shape for an item in the list. The list is expanded if necessary.
      Parameters:
      index - the index (zero-based).
      shape - the Shape.
    • clone

      Returns an independent copy of the list.
      Overrides:
      clone in class AbstractObjectList
      Returns:
      A clone.
      Throws:
      CloneNotSupportedException - if an item in the list does not support cloning.
    • equals

      public boolean equals(Object obj)
      Tests the list for equality with another object (typically also a list).
      Overrides:
      equals in class AbstractObjectList
      Parameters:
      obj - the other object (null permitted).
      Returns:
      A boolean.
    • hashCode

      public int hashCode()
      Returns a hash code value for the object.
      Overrides:
      hashCode in class AbstractObjectList
      Returns:
      the hashcode