Package geomss.geom
Class AbstractPointGeomList<T extends AbstractPointGeomList,E extends PointGeometry>
- java.lang.Object
-
- geomss.geom.AbstractGeomElement<T>
-
- geomss.geom.AbstractGeomList<T,E>
-
- geomss.geom.AbstractPointGeomList<T,E>
-
- 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 ofPointGeometryobjects.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
-
-
Field Summary
-
Fields inherited from class geomss.geom.AbstractGeomElement
RESOURCES
-
-
Constructor Summary
Constructors Constructor Description AbstractPointGeomList()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(int index, E value)Inserts the specifiedPointGeometryat the specified position in this list.intgetNumberOfPoints()Return the total number of points in this geometry element.intgetPhyDimension()Returns the number of physical dimensions of the geometry element.Eset(int index, E element)Replaces the PointGeometry at the specified position in this list with the specified element.-
Methods inherited from class geomss.geom.AbstractGeomList
add, add, add, addAll, addAll, addAll, addAll, clear, contains, containsAll, containsGeometry, equals, get, get, getAll, getBoundsMax, getBoundsMin, getFirst, getIndexFromName, getLast, getLimitPoint, getParDimension, getRange, getUnit, hashCode, indexOf, isEmpty, isValid, iterator, lastIndexOf, listIterator, listIterator, remove, remove, remove, removeAll, reset, retainAll, reverse, size, subList, toArray, toArray, toText, unmodifiableList
-
Methods inherited from class geomss.geom.AbstractGeomElement
addChangeListener, clone, compareTo, getAllUserData, getID, getName, getUserData, putAllUserData, putUserData, removeChangeListener, removeUserData, setName, toString
-
Methods inherited from interface geomss.geom.GeomElement
addChangeListener, copy, copyToReal, getAllUserData, getBoundsMax, getBoundsMin, getID, getLimitPoint, getName, getParDimension, getUnit, getUserData, isValid, putAllUserData, putUserData, removeChangeListener, removeUserData, setName, size, toText
-
Methods inherited from interface geomss.geom.GeometryList
to, toDimension
-
Methods inherited from interface geomss.geom.PointGeometry
to
-
Methods inherited from interface geomss.geom.Transformable
getTransformed
-
-
-
-
Constructor Detail
-
AbstractPointGeomList
public AbstractPointGeomList()
-
-
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:
setin interfacejava.util.List<T extends AbstractPointGeomList>- Overrides:
setin classAbstractGeomList<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- - ifindex > 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 specifiedPointGeometryat 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:
addin interfacejava.util.List<T extends AbstractPointGeomList>- Overrides:
addin classAbstractGeomList<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- ifindex > thisSize()DimensionException- if the input element's dimensions are different from this list's dimensions.
-
getPhyDimension
public int getPhyDimension()
Returns the number of physical dimensions of the geometry element. This implementation always returns the physical dimension of the underlyingPointGeometryobjects or 0 if this list has no PointGeometry objects in it.- Specified by:
getPhyDimensionin interfaceGeomElement<T extends AbstractPointGeomList>- Overrides:
getPhyDimensionin classAbstractGeomList<T extends AbstractPointGeomList,E extends PointGeometry>- Returns:
- The number of physical dimensions of this geometry element.
-
getNumberOfPoints
public int getNumberOfPoints()
Return the total number of points in this geometry element.- Specified by:
getNumberOfPointsin interfacePointGeometry<T extends AbstractPointGeomList>- Returns:
- The total number of points in this geometry element.
-
-