E
- The type of element stored in this list.public final class GeomList<E extends GeomElement> extends AbstractGeomList<GeomList,E>
GeomElement
objects.
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
RESOURCES
Modifier and Type | Method and Description |
---|---|
GeomList |
copy()
Returns a copy of this
GeomList instance
allocated by the calling thread
(possibly on the stack). |
GeomList |
copyToReal()
Return a copy of this object with any transformations or subranges removed
(applied).
|
GeomList |
getRange(int first,
int last)
Returns the range of elements in this list from the specified start and ending
indexes.
|
GeomList |
getTransformed(GTransform transform)
Returns transformed version of this element.
|
static GeomList |
newInstance()
Returns a new, empty, preallocated or recycled
GeomList instance (on
the stack when executing in a StackContext ) that can store a list of
GeomElement objects. |
static GeomList |
newInstance(java.lang.String name)
Returns a new, empty, preallocated or recycled
GeomList instance (on
the stack when executing in a StackContext ) with the specified name,
that can store a list of GeomElement objects. |
static void |
recycle(GeomList instance)
Recycles a GeomList instance immediately (on the stack when executing in a
StackContext).
|
GeomList |
reverse()
Returns an new
GeomList with the elements in this list in reverse order. |
GeomList |
to(Unit<Length> unit)
Returns the equivalent to this list but with all the elements stated in the
specified unit.
|
GeomList |
toDimension(int newDim)
Return a copy of this list converted to the specified number of physical
dimensions.
|
static GeomList |
valueOf(GeomElement... elements)
Return a GeomList containing the
GeomElement objects in the specified
array. |
static GeomList |
valueOf(java.lang.String name,
java.util.Collection<? extends GeomElement> elements)
Return a GeomList containing the
GeomElement objects in the specified
collection. |
static GeomList |
valueOf(java.lang.String name,
GeomElement... elements)
Return a GeomList containing the
GeomElement objects in the specified list. |
add, add, add, add, addAll, addAll, addAll, addAll, clear, contains, containsAll, containsGeometry, equals, get, get, getAll, getBoundsMax, getBoundsMin, getFirst, getIndexFromName, getLast, getLimitPoint, getParDimension, getPhyDimension, getUnit, hashCode, indexOf, isEmpty, isValid, iterator, lastIndexOf, listIterator, listIterator, remove, remove, remove, removeAll, reset, retainAll, set, size, subList, toArray, toArray, toText, unmodifiableList
addChangeListener, clone, compareTo, getAllUserData, getID, getName, getUserData, putAllUserData, putUserData, removeChangeListener, removeUserData, setName, toString
addChangeListener, getAllUserData, getID, getName, getUserData, putAllUserData, putUserData, removeChangeListener, removeUserData, setName
public static GeomList newInstance()
GeomList
instance (on
the stack when executing in a StackContext
) that can store a list of
GeomElement
objects.public static GeomList newInstance(java.lang.String name)
GeomList
instance (on
the stack when executing in a StackContext
) with the specified name,
that can store a list of GeomElement
objects.name
- The name to be assigned to this list (may be null
).public static GeomList valueOf(java.lang.String name, java.util.Collection<? extends GeomElement> elements)
GeomElement
objects in the specified
collection.name
- The name to be assigned to this list (may be null
).elements
- A collection of geometry elements. May not be null.public static GeomList valueOf(java.lang.String name, GeomElement... elements)
GeomElement
objects in the specified list.name
- The name to be assigned to this list (may be null
).elements
- A list of geometry elements. May not be null.public static GeomList valueOf(GeomElement... elements)
GeomElement
objects in the specified
array.elements
- An array of geometry elements. May not be null.public GeomList getRange(int first, int last)
getRange
in interface GeometryList<GeomList,E extends GeomElement>
getRange
in class AbstractGeomList<GeomList,E extends GeomElement>
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).java.lang.IndexOutOfBoundsException
- if the given index is out of range:
index >= size()
public GeomList reverse()
GeomList
with the elements in this list in reverse order.reverse
in interface GeometryList<GeomList,E extends GeomElement>
reverse
in class AbstractGeomList<GeomList,E extends GeomElement>
public GeomList toDimension(int newDim)
newDim
- The dimension of the element to return.public GeomList to(Unit<Length> unit) throws ConversionException
unit
- the length unit of the list to be returned. May not be null.ConversionException
- if the the input unit is not a length unit.public GeomList copy()
GeomList
instance
allocated
by the calling thread
(possibly on the stack).public GeomList copyToReal()
public GeomList getTransformed(GTransform transform)
GeomTransform
and contains transformed versions of the contents of this
list as children. Any list elements that are not transformable will simply be added
to the output list without transformation.transform
- The transform to apply to this geometry element. May not be null.DimensionException
- if this element is not 3D.