Package geomss.geom

Class AbstractPointGeomList<T extends AbstractPointGeomList,​E extends PointGeometry>

  • Type Parameters:
    T - The sub-type of this AbstractPointGeomList list.
    E - The type of PointGeometry element contained in this geometry list.
    All Implemented Interfaces:
    GeomElement<T>, GeometryList<T,​E>, PointGeometry<T>, Transformable<T>, java.io.Serializable, java.lang.Cloneable, java.lang.Comparable, java.lang.Iterable<E>, java.util.Collection<E>, java.util.List<E>, javolution.lang.Reusable, javolution.xml.XMLSerializable
    Direct Known Subclasses:
    PointArray, PointComponent, PointString, PointVehicle

    public abstract class AbstractPointGeomList<T extends AbstractPointGeomList,​E extends PointGeometry>
    extends AbstractGeomList<T,​E>
    implements PointGeometry<T>
    Partial implementation of a named list of PointGeometry objects.

    WARNING: This list allows geometry to be stored in different units. If consistent units are required, then the user must specifically convert the list items.

    Modified by: Joseph A. Huwaldt

    Version:
    February 17, 2025
    Author:
    Joseph A. Huwaldt, Date: May 3, 2009
    See Also:
    Serialized Form
    • Method Detail

      • set

        public E set​(int index,
                     E element)
        Replaces the PointGeometry at the specified position in this list with the specified element. Null elements are ignored. The input element must have the same physical dimensions as the other items in this list, or an exception is thrown.
        Specified by:
        set in interface java.util.List<T extends AbstractPointGeomList>
        Overrides:
        set in class AbstractGeomList<T extends AbstractPointGeomList,​E extends PointGeometry>
        Parameters:
        index - The index of the element to replace. (0 returns the 1st element, -1 returns the last, -2 returns the 2nd from last, etc).
        element - The element to be stored at the specified position. May not be null.
        Returns:
        The element previously at the specified position in this list.
        Throws:
        java.lang.IndexOutOfBoundsException - - if index > thisSize()
        DimensionException - if the input element's dimensions are different from this list's dimensions.
      • add

        public void add​(int index,
                        E value)
        Inserts the specified PointGeometry at the specified position in this list. Shifts the element currently at that position (if any) and any subsequent elements to the right (adds one to their indices). Null values are ignored. The input value must have the same physical dimensions as the other items in this list, or an exception is thrown.

        Note: If this method is used concurrent access must be synchronized (the table is not thread-safe).

        Specified by:
        add in interface java.util.List<T extends AbstractPointGeomList>
        Overrides:
        add in class AbstractGeomList<T extends AbstractPointGeomList,​E extends PointGeometry>
        Parameters:
        index - the index at which the specified element is to be inserted. (0 returns the 1st element, -1 returns the last, -2 returns the 2nd from last, etc).
        value - the element to be inserted. May not be null.
        Throws:
        java.lang.IndexOutOfBoundsException - if index > thisSize()
        DimensionException - if the input element's dimensions are different from this list's dimensions.