Package geomss.geom
Class AbstractGeomList<T extends AbstractGeomList,E extends GeomElement>
- java.lang.Object
-
- geomss.geom.AbstractGeomElement<T>
-
- geomss.geom.AbstractGeomList<T,E>
-
- Type Parameters:
T
- The sub-type of this AbstractGeomList.E
- The type of GeomElement contained in this list.
- All Implemented Interfaces:
GeomElement<T>
,GeometryList<T,E>
,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:
AbstractPointGeomList
,GeomList
,TriangleList
public abstract class AbstractGeomList<T extends AbstractGeomList,E extends GeomElement> extends AbstractGeomElement<T> implements GeometryList<T,E>
Partial implementation of a list ofGeomElement
objects. The list will not accept the addition ofnull
elements.WARNING: This list allows geometry to be stored in different units and with different physical dimensions. If consistent units or dimensions 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: March 31, 2000
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class geomss.geom.AbstractGeomElement
RESOURCES
-
-
Constructor Summary
Constructors Constructor Description AbstractGeomList()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
add(int index, E value)
Inserts the specifiedGeomElement
at the specified position in this list.boolean
add(int index, E... array)
Inserts all of theGeomElement
objects in the specified list of arguments into this list at the specified position.boolean
add(E value)
Appends the specifiedGeomElement
to the end of this list.boolean
add(E... array)
Appends all of the elements in the specified list of arguments to this geometry element list.boolean
addAll(int index, E[] arr)
Inserts all of theGeomElement
objects in the specified array into this list at the specified position.boolean
addAll(int index, java.util.Collection<? extends E> c)
Inserts all of theGeomElement
objects in the specified collection into this list at the specified position.boolean
addAll(E[] arr)
Appends all of the elements in the specified array to this geometry element list.boolean
addAll(java.util.Collection<? extends E> c)
Adds all of the elements in the specified collection to this geometry element list.void
clear()
Removes all of the elements from this collection.boolean
contains(java.lang.Object o)
Returns true if this collection contains the specified element.boolean
containsAll(java.util.Collection<?> c)
Returns true if this collection contains all of the elements in the specified collection.boolean
containsGeometry()
Returnstrue
if this list actually contains any geometry andfalse
if this list is empty or contains only non-geometry items such as empty lists.boolean
equals(java.lang.Object obj)
Compares the specified object with this list ofGeomElement
objects for equality.E
get(int index)
Returns the element at the specified position in this list.E
get(java.lang.String name)
Returns the element with the specified name from this list.GeomList<E>
getAll()
Returns a newGeomList
with the elements in this list.Point
getBoundsMax()
Return the coordinate point representing the maximum bounding box corner (e.g.: max X, max Y, max Z).Point
getBoundsMin()
Return the coordinate point representing the minimum bounding box corner of this geometry element (e.g.: min X, min Y, min Z).E
getFirst()
Returns the first element from this list.int
getIndexFromName(java.lang.String name)
Return the index to the 1st geometry element in this list with the specified name.E
getLast()
Returns the last element from this list.GeomPoint
getLimitPoint(int dim, boolean max, double tol)
Returns the most extreme point, either minimum or maximum, in the specified coordinate direction for the geometry in this list.int
getParDimension()
Returns the number of parametric dimensions of the geometry element.int
getPhyDimension()
Returns the number of physical dimensions of the geometry element.abstract T
getRange(int first, int last)
Returns the range of elements in this list from the specified start and ending indexes.javax.measure.unit.Unit<javax.measure.quantity.Length>
getUnit()
Returns the unit in which the first geometry element in this list is stated.int
hashCode()
Returns the hash code for thisAbstractGeomList
.int
indexOf(java.lang.Object element)
Returns the index in this list of the first occurrence of the specified element, or -1 if the list does not contain this element.boolean
isEmpty()
Returnstrue
if this collection contains no elements.boolean
isValid()
Returntrue
if this geometry list contains valid and finite numerical components.java.util.Iterator<E>
iterator()
Returns an iterator over the elements in this list.int
lastIndexOf(java.lang.Object element)
Returns the index in this list of the last occurrence of the specified element, or -1 if the list does not contain this element.java.util.ListIterator<E>
listIterator()
Returns a list iterator over the elements in this list.java.util.ListIterator<E>
listIterator(int index)
Returns a list iterator from the specified position.E
remove(int index)
Removes the element at the specified position in this list.boolean
remove(java.lang.Object o)
Removes a single instance of the specified element from this collection, if it is present (optional operation).E
remove(java.lang.String name)
Removes the element with the specified name from this list.boolean
removeAll(java.util.Collection<?> c)
Removes from this list all the elements that are contained in the specified collection.void
reset()
Resets the internal state of this object to its default values.boolean
retainAll(java.util.Collection<?> c)
Retains only the elements in this list that are contained in the specified collection.abstract T
reverse()
Returns an newGeomList
with the elements in this list in reverse order.E
set(int index, E element)
Replaces the GeomElement at the specified position in this list with the specified element.int
size()
Returns the number of elements in this list.java.util.List<E>
subList(int fromIndex, int toIndex)
Returns a view of the portion of this list between fromIndex, inclusive, and toIndex, exclusive.java.lang.Object[]
toArray()
Returns an array containing all of the elements in this collection.<T> T[]
toArray(T[] a)
Returns an array containing all of the elements in this collection.javolution.text.Text
toText()
Returns the text representation of this geometry element.java.util.List<E>
unmodifiableList()
Returns an unmodifiable list view associated to this list.-
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, getID, getName, getUserData, putAllUserData, putUserData, removeChangeListener, removeUserData, setName
-
Methods inherited from interface geomss.geom.GeometryList
to, toDimension
-
Methods inherited from interface geomss.geom.Transformable
getTransformed
-
-
-
-
Constructor Detail
-
AbstractGeomList
public AbstractGeomList()
-
-
Method Detail
-
size
public int size()
Returns the number of elements in this list. If the list contains more than Integer.MAX_VALUE elements, returns Integer.MAX_VALUE.- Specified by:
size
in interfacejava.util.Collection<T extends AbstractGeomList>
- Specified by:
size
in interfaceGeomElement<T extends AbstractGeomList>
- Specified by:
size
in interfacejava.util.List<T extends AbstractGeomList>
- Returns:
- the number of elements in this list.
-
isEmpty
public boolean isEmpty()
Returnstrue
if this collection contains no elements.- Specified by:
isEmpty
in interfacejava.util.Collection<T extends AbstractGeomList>
- Specified by:
isEmpty
in interfacejava.util.List<T extends AbstractGeomList>
-
containsGeometry
public boolean containsGeometry()
Returnstrue
if this list actually contains any geometry andfalse
if this list is empty or contains only non-geometry items such as empty lists.- Specified by:
containsGeometry
in interfaceGeometryList<T extends AbstractGeomList,E extends GeomElement>
- Returns:
- true if this list actually contains geometry.
-
get
public E get(int index)
Returns the element at the specified position in this list.- Specified by:
get
in interfacejava.util.List<T extends AbstractGeomList>
- Parameters:
index
- index of element to return (0 returns the 1st element, -1 returns the last, -2 returns the 2nd from last, etc).- Returns:
- the element at the specified position in this list.
- Throws:
java.lang.IndexOutOfBoundsException
- if the given index is out of range:index > size()
-
getRange
public abstract T getRange(int first, int last)
Returns the range of elements in this list from the specified start and ending indexes.- Specified by:
getRange
in interfaceGeometryList<T extends AbstractGeomList,E extends GeomElement>
- Parameters:
first
- index of the first element to return (0 returns the 1st element, -1 returns the last, etc).last
- index of the last element to return (0 returns the 1st element, -1 returns the last, etc).- Returns:
- the list of elements in the given range from this list.
- Throws:
java.lang.IndexOutOfBoundsException
- if the given index is out of range:index > size()
-
subList
public java.util.List<E> subList(int fromIndex, int toIndex)
Returns a view of the portion of this list between fromIndex, inclusive, and toIndex, exclusive. (If fromIndex and toIndex are equal, the returned list is empty.) The returned list is backed by this list, so changes in the returned list are reflected in this list, and vice-versa. The returned list supports all of the optional list operations supported by this list. This method eliminates the need for explicit range operations (of the sort that commonly exist for arrays). Any operation that expects a list can be used as a range operation by passing a subList view instead of a whole list. For example, the following idiom removes a range of values from a list:list.subList(from, to).clear();
Similar idioms may be constructed forindexOf
andlastIndexOf
, and all of the algorithms in theCollections
class can be applied to a subList. The semantics of the list returned by this method become undefined if the backing list (i.e., this list) is structurally modified in any way other than via the returned list (structural modifications are those that change the size of this list, or otherwise perturb it in such a fashion that iterations in progress may yield incorrect results).- Specified by:
subList
in interfacejava.util.List<T extends AbstractGeomList>
- Parameters:
fromIndex
- low endpoint (inclusive) of the subList.toIndex
- high endpoint (exclusive) of the subList.- Returns:
- a view of the specified range within this list.
- Throws:
java.lang.IndexOutOfBoundsException
- if the given index is out of range:index > size()
-
getFirst
public E getFirst()
Returns the first element from this list.- Specified by:
getFirst
in interfaceGeometryList<T extends AbstractGeomList,E extends GeomElement>
- Returns:
- the first element in this list.
-
getLast
public E getLast()
Returns the last element from this list.- Specified by:
getLast
in interfaceGeometryList<T extends AbstractGeomList,E extends GeomElement>
- Returns:
- the last element in this list.
-
get
public E get(java.lang.String name)
Returns the element with the specified name from this list.- Specified by:
get
in interfaceGeometryList<T extends AbstractGeomList,E extends GeomElement>
- Parameters:
name
- The name of the element we are looking for in the list.- Returns:
- The element matching the specified name. If the specified element name
isn't found in the list, then
null
is returned.
-
set
public E set(int index, E element)
Replaces the GeomElement at the specified position in this list with the specified element. Null elements are ignored. If the input element units are not the same as this list, the element is converted to the units of this list.- Specified by:
set
in interfacejava.util.List<T extends AbstractGeomList>
- 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 > size()
-
add
public void add(int index, E value)
Inserts the specifiedGeomElement
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.Note: If this method is used, concurrent access must be synchronized (the list is not thread-safe).
- Specified by:
add
in interfacejava.util.List<T extends AbstractGeomList>
- 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 > size()
-
add
public boolean add(E value)
Appends the specifiedGeomElement
to the end of this list. Null values are ignored.Note: If this method is used concurrent access must be synchronized (the table is not thread-safe).
- Specified by:
add
in interfacejava.util.Collection<T extends AbstractGeomList>
- Specified by:
add
in interfacejava.util.List<T extends AbstractGeomList>
- Parameters:
value
- the element to be inserted. May not be null.- Returns:
true
if this collection changed as a result of the call.- Throws:
DimensionException
- if the input element's dimensions are different from this list's dimensions.
-
addAll
public boolean addAll(java.util.Collection<? extends E> c)
Adds all of the elements in the specified collection to this geometry element list. The behavior of this operation is undefined if the specified collection is modified while the operation is in progress. (This implies that the behavior of this call is undefined if the specified collection is this collection, and this collection is nonempty.)- Specified by:
addAll
in interfacejava.util.Collection<T extends AbstractGeomList>
- Specified by:
addAll
in interfacejava.util.List<T extends AbstractGeomList>
- Parameters:
c
- elements to be inserted into this collection. May not be null.- Returns:
true
if this collection changed as a result of the call.
-
addAll
public boolean addAll(int index, java.util.Collection<? extends E> c)
Inserts all of theGeomElement
objects in the specified collection into this list at the specified position. Shifts the element currently at that position (if any) and any subsequent elements to the right (increases their indices). The new elements will appear in this list in the order that they are returned by the specified collection's iterator. The behavior of this operation is unspecified if the specified collection is modified while the operation is in progress. (Note that this will occur if the specified collection is this list, and it's nonempty.)- Specified by:
addAll
in interfacejava.util.List<T extends AbstractGeomList>
- Parameters:
index
- index at which to insert first element from the specified collection.c
- elements to be inserted into this collection. May not be null.- Returns:
true
if this collection changed as a result of the call.
-
addAll
public boolean addAll(E[] arr)
Appends all of the elements in the specified array to this geometry element list. The behavior of this operation is undefined if the specified collection is modified while the operation is in progress.- Specified by:
addAll
in interfaceGeometryList<T extends AbstractGeomList,E extends GeomElement>
- Parameters:
arr
- elements to be appended onto this collection. May not be null.- Returns:
true
if this collection changed as a result of the call.
-
addAll
public boolean addAll(int index, E[] arr)
Inserts all of theGeomElement
objects in the specified array into this list at the specified position. Shifts the element currently at that position (if any) and any subsequent elements to the right (increases their indices). The new elements will appear in this list in the order that they are returned by the specified collection's iterator.- Specified by:
addAll
in interfaceGeometryList<T extends AbstractGeomList,E extends GeomElement>
- Parameters:
index
- index at which to insert first element from the specified array.arr
- elements to be inserted into this collection. May not be null.- Returns:
true
if this collection changed as a result of the call.
-
add
public boolean add(E... array)
Appends all of the elements in the specified list of arguments to this geometry element list.- Specified by:
add
in interfaceGeometryList<T extends AbstractGeomList,E extends GeomElement>
- Parameters:
array
- elements to be inserted into this collection. May not be null.- Returns:
true
if this collection changed as a result of the call.
-
add
public boolean add(int index, E... array)
Inserts all of theGeomElement
objects in the specified list of arguments into this list at the specified position. Shifts the element currently at that position (if any) and any subsequent elements to the right (increases their indices). The new elements will appear in this list in the order that they are appeared in the array.- Specified by:
add
in interfaceGeometryList<T extends AbstractGeomList,E extends GeomElement>
- Parameters:
index
- index at which to insert first element from the specified array.array
- elements to be inserted into this collection. May not be null.- Returns:
true
if this collection changed as a result of the call.
-
remove
public E remove(int index)
Removes the element at the specified position in this list. Shifts any subsequent elements to the left (subtracts one from their indices). Returns the element that was removed from the list.- Specified by:
remove
in interfacejava.util.List<T extends AbstractGeomList>
- Parameters:
index
- the index of the element to remove. (0 returns the 1st element, -1 returns the last, -2 returns the 2nd from last, etc).- Returns:
- the element previously at the specified position.
-
remove
public boolean remove(java.lang.Object o)
Removes a single instance of the specified element from this collection, if it is present (optional operation). More formally, removes an element e such that(o==null ? e==null : o.equals(e))
, if this collection contains one or more such elements. Returns true if this collection contained the specified element (or equivalently, if this collection changed as a result of the call).- Specified by:
remove
in interfacejava.util.Collection<T extends AbstractGeomList>
- Specified by:
remove
in interfacejava.util.List<T extends AbstractGeomList>
- Parameters:
o
- element to be removed from this collection, if present.- Returns:
true
if this collection changed as a result of the call.
-
remove
public E remove(java.lang.String name)
Removes the element with the specified name from this list. Shifts any subsequent elements to the left (subtracts one from their indices). Returns the element that was removed from the list.- Specified by:
remove
in interfaceGeometryList<T extends AbstractGeomList,E extends GeomElement>
- Parameters:
name
- the name of the element to remove.- Returns:
- the element previously at the specified position.
-
clear
public void clear()
Removes all of the elements from this collection. The collection will be empty after this call returns.- Specified by:
clear
in interfacejava.util.Collection<T extends AbstractGeomList>
- Specified by:
clear
in interfacejava.util.List<T extends AbstractGeomList>
-
iterator
public java.util.Iterator<E> iterator()
Returns an iterator over the elements in this list.- Specified by:
iterator
in interfacejava.util.Collection<T extends AbstractGeomList>
- Specified by:
iterator
in interfacejava.lang.Iterable<T extends AbstractGeomList>
- Specified by:
iterator
in interfacejava.util.List<T extends AbstractGeomList>
- Returns:
- an iterator over this list values.
-
listIterator
public java.util.ListIterator<E> listIterator()
Returns a list iterator over the elements in this list.- Specified by:
listIterator
in interfacejava.util.List<T extends AbstractGeomList>
- Returns:
- an iterator over this list values.
-
listIterator
public java.util.ListIterator<E> listIterator(int index)
Returns a list iterator from the specified position.- Specified by:
listIterator
in interfacejava.util.List<T extends AbstractGeomList>
- Parameters:
index
- the index of first value to be returned from the list iterator (by a call to the next method).- Returns:
- a list iterator of the values in this table starting at the specified position in this list.
-
unmodifiableList
public java.util.List<E> unmodifiableList()
Returns an unmodifiable list view associated to this list. Attempts to modify the returned collection result in an UnsupportedOperationException being thrown.- Specified by:
unmodifiableList
in interfaceGeometryList<T extends AbstractGeomList,E extends GeomElement>
- Returns:
- the unmodifiable view over this list.
-
getAll
public GeomList<E> getAll()
Returns a newGeomList
with the elements in this list.- Specified by:
getAll
in interfaceGeometryList<T extends AbstractGeomList,E extends GeomElement>
- Returns:
- A new GeomList with the elements in this list.
-
removeAll
public boolean removeAll(java.util.Collection<?> c)
Removes from this list all the elements that are contained in the specified collection.- Specified by:
removeAll
in interfacejava.util.Collection<T extends AbstractGeomList>
- Specified by:
removeAll
in interfacejava.util.List<T extends AbstractGeomList>
- Parameters:
c
- collection that defines which elements will be removed from this list.- Returns:
true
if this list changed as a result of the call.
-
retainAll
public boolean retainAll(java.util.Collection<?> c)
Retains only the elements in this list that are contained in the specified collection. In other words, removes from this list all the elements that are not contained in the specified collection.- Specified by:
retainAll
in interfacejava.util.Collection<T extends AbstractGeomList>
- Specified by:
retainAll
in interfacejava.util.List<T extends AbstractGeomList>
- Parameters:
c
- collection that defines which elements this set will retain. May not be null.- Returns:
true
if this list changed as a result of the call.
-
reverse
public abstract T reverse()
Returns an newGeomList
with the elements in this list in reverse order.- Specified by:
reverse
in interfaceGeometryList<T extends AbstractGeomList,E extends GeomElement>
- Returns:
- A new list with the elements in this list in reverse order.
-
indexOf
public int indexOf(java.lang.Object element)
Returns the index in this list of the first occurrence of the specified element, or -1 if the list does not contain this element.- Specified by:
indexOf
in interfacejava.util.List<T extends AbstractGeomList>
- Parameters:
element
- The element to search for.- Returns:
- the index in this List of the first occurrence of the specified element, or -1 if the List does not contain this element.
-
lastIndexOf
public int lastIndexOf(java.lang.Object element)
Returns the index in this list of the last occurrence of the specified element, or -1 if the list does not contain this element. More formally, returns the highest index i such that (o==null ? get(i)==null : o.equals(get(i))), or -1 if there is no such index.- Specified by:
lastIndexOf
in interfacejava.util.List<T extends AbstractGeomList>
- Parameters:
element
- The element to search for.- Returns:
- the index in this list of the last occurrence of the specified element, or -1 if the list does not contain this element.
-
getIndexFromName
public int getIndexFromName(java.lang.String name)
Return the index to the 1st geometry element in this list with the specified name. Objects withnull
names are ignored.- Specified by:
getIndexFromName
in interfaceGeometryList<T extends AbstractGeomList,E extends GeomElement>
- Parameters:
name
- The name of the geometry element to find in this list- Returns:
- The index to the named geometry element or -1 if it is not found.
-
contains
public boolean contains(java.lang.Object o)
Returns true if this collection contains the specified element. More formally, returns true if and only if this collection contains at least one element e such that (o==null ? e==null : o.equals(e)).- Specified by:
contains
in interfacejava.util.Collection<T extends AbstractGeomList>
- Specified by:
contains
in interfacejava.util.List<T extends AbstractGeomList>
- Parameters:
o
- object to be checked for containment in this collection.- Returns:
true
if this collection contains the specified element.
-
containsAll
public boolean containsAll(java.util.Collection<?> c)
Returns true if this collection contains all of the elements in the specified collection.- Specified by:
containsAll
in interfacejava.util.Collection<T extends AbstractGeomList>
- Specified by:
containsAll
in interfacejava.util.List<T extends AbstractGeomList>
- Parameters:
c
- collection to be checked for containment in this collection. May not be null.- Returns:
true
if this collection contains all of the elements in the specified collection.
-
toArray
public java.lang.Object[] toArray()
Returns an array containing all of the elements in this collection.- Specified by:
toArray
in interfacejava.util.Collection<T extends AbstractGeomList>
- Specified by:
toArray
in interfacejava.util.List<T extends AbstractGeomList>
-
toArray
public <T> T[] toArray(T[] a)
Returns an array containing all of the elements in this collection. If the collection fits in the specified array, it is returned therein. Otherwise, a new array is allocated with the runtime type of the specified array and the size of this collection.- Specified by:
toArray
in interfacejava.util.Collection<T extends AbstractGeomList>
- Specified by:
toArray
in interfacejava.util.List<T extends AbstractGeomList>
- Type Parameters:
T
- The type of elements in this collection.- Parameters:
a
- the array into which the elements of the collection are to be stored, if it is big enough; otherwise, a new array of the same type is allocated for this purpose.- Returns:
- an array containing the elements of the collection.
-
isValid
public boolean isValid()
Returntrue
if this geometry list contains valid and finite numerical components. A value offalse
will be returned if any of the elements in this list are invalid.- Specified by:
isValid
in interfaceGeomElement<T extends AbstractGeomList>
- Returns:
- true if this geometry element contains valid and finite data.
-
getUnit
public javax.measure.unit.Unit<javax.measure.quantity.Length> getUnit()
Returns the unit in which the first geometry element in this list is stated. If the list contains no geometry elements, then the default unit is returned.- Specified by:
getUnit
in interfaceGeomElement<T extends AbstractGeomList>
- Returns:
- The unit in which the geometry in this element are stated.
-
equals
public boolean equals(java.lang.Object obj)
Compares the specified object with this list ofGeomElement
objects for equality. Returns true if and only if both collections are of the same type and both collections contain equal elements in the same order.- Specified by:
equals
in interfacejava.util.Collection<T extends AbstractGeomList>
- Specified by:
equals
in interfacejava.util.List<T extends AbstractGeomList>
- Overrides:
equals
in classAbstractGeomElement<T extends AbstractGeomList>
- Parameters:
obj
- the object to compare with.- Returns:
true
if this list is identical to that list;false
otherwise.
-
hashCode
public int hashCode()
Returns the hash code for thisAbstractGeomList
.- Specified by:
hashCode
in interfacejava.util.Collection<T extends AbstractGeomList>
- Specified by:
hashCode
in interfacejava.util.List<T extends AbstractGeomList>
- Overrides:
hashCode
in classAbstractGeomElement<T extends AbstractGeomList>
- Returns:
- the hash code value.
-
toText
public javolution.text.Text toText()
Returns the text representation of this geometry element.- Specified by:
toText
in interfaceGeomElement<T extends AbstractGeomList>
- Overrides:
toText
in classAbstractGeomElement<T extends AbstractGeomList>
- Returns:
- The text representation of this geometry element.
-
getPhyDimension
public int getPhyDimension()
Returns the number of physical dimensions of the geometry element. This implementation always returns 0.- Specified by:
getPhyDimension
in interfaceGeomElement<T extends AbstractGeomList>
- Returns:
- The number of physical dimensions of this geometry element.
-
getParDimension
public int getParDimension()
Returns the number of parametric dimensions of the geometry element. This implementation always returns 0.- Specified by:
getParDimension
in interfaceGeomElement<T extends AbstractGeomList>
- Returns:
- The number of parametric dimensions of this geometry element.
-
getBoundsMin
public Point getBoundsMin()
Return the coordinate point representing the minimum bounding box corner of this geometry element (e.g.: min X, min Y, min Z). The physical dimension of the returned point will be that of the highest physical dimension object in this list.- Specified by:
getBoundsMin
in interfaceGeomElement<T extends AbstractGeomList>
- Returns:
- The minimum bounding box coordinate for this geometry element.
- Throws:
java.lang.IndexOutOfBoundsException
- if this list contains no geometry.
-
getBoundsMax
public Point getBoundsMax()
Return the coordinate point representing the maximum bounding box corner (e.g.: max X, max Y, max Z). The physical dimension of the returned point will be that of the highest physical dimension object in this list.- Specified by:
getBoundsMax
in interfaceGeomElement<T extends AbstractGeomList>
- Returns:
- The maximum bounding box coordinate for this geometry element.
- Throws:
java.lang.IndexOutOfBoundsException
- if this list contains no elements.
-
getLimitPoint
public GeomPoint getLimitPoint(int dim, boolean max, double tol)
Returns the most extreme point, either minimum or maximum, in the specified coordinate direction for the geometry in this list.- Specified by:
getLimitPoint
in interfaceGeomElement<T extends AbstractGeomList>
- Parameters:
dim
- An index indicating the dimension to find the min/max point for (0=X, 1=Y, 2=Z, etc).max
- Set totrue
to return the maximum value,false
to return the minimum.tol
- Fractional tolerance to refine the min/max point position to if necessary.- Returns:
- The point found on this element that is the min or max in the specified coordinate direction.
- See Also:
GeomElement.getBoundsMin()
,GeomElement.getBoundsMax()
-
reset
public void reset()
Resets the internal state of this object to its default values. Subclasses that override this method must callsuper.reset();
to ensure that the state is reset properly.- Specified by:
reset
in interfacejavolution.lang.Reusable
- Overrides:
reset
in classAbstractGeomElement<T extends AbstractGeomList>
-
-