public final class PointComponent extends AbstractPointGeomList<PointComponent,PointArray>
PointArray
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
RESOURCES
Modifier and Type | Method and Description |
---|---|
void |
add(int index,
PointArray value)
Inserts the specified
PointArray at the specified position in this list. |
boolean |
addAll(int index,
java.util.Collection<? extends PointArray> c)
Inserts all of the
PointArray objects in the specified collection into this
list at the specified position. |
PointComponent |
copy()
Returns a copy of this
PointComponent instance
allocated by the calling thread
(possibly on the stack). |
PointComponent |
copyToReal()
Return a copy of this object with any transformations or subranges removed
(applied).
|
int |
getNumberOfPanels()
Return the total number of quadrilateral panels in this component.
|
PointComponent |
getRange(int first,
int last)
Returns the range of elements in this list from the specified start and ending
indexes.
|
PointComponent |
getTransformed(GTransform transform)
Returns transformed version of this element.
|
static PointComponent |
newInstance()
Returns a new, empty, preallocated or recycled
PointComponent instance
(on the stack when executing in a StackContext ), that can store a list
of PointArray objects. |
static PointComponent |
newInstance(java.lang.String name)
Returns a new, empty, preallocated or recycled
PointComponent instance
(on the stack when executing in a StackContext ) with the specified
name, that can store a list of PointArray objects. |
static void |
recycle(PointComponent instance)
Recycles a case instance immediately (on the stack when executing in a
StackContext).
|
PointComponent |
reverse()
Returns an new
PointString with the elements in this list in reverse order. |
PointArray |
set(int index,
PointArray element)
Replaces the
PointArray at the specified position in this list with the
specified element. |
PointComponent |
to(Unit<Length> unit)
Returns the equivalent to this list but with all the elements stated in the
specified unit.
|
PointComponent |
toDimension(int newDim)
Return the equivalent of this list converted to the specified number of physical
dimensions.
|
static PointComponent |
valueOf(PointArray... elements)
Return a PointComponent made up of the
PointArray objects in the specified
array. |
static PointComponent |
valueOf(java.lang.String name,
java.util.Collection<? extends PointArray> elements)
Return a PointComponent made up of the
PointArray objects in the specified
collection. |
static PointComponent |
valueOf(java.lang.String name,
PointArray... elements)
Return a PointComponent made up of the
PointArray objects in the specified
array. |
getNumberOfPoints, getPhyDimension
add, add, add, addAll, addAll, addAll, clear, contains, containsAll, containsGeometry, equals, get, get, getAll, getBoundsMax, getBoundsMin, getFirst, getIndexFromName, getLast, getLimitPoint, getParDimension, getUnit, hashCode, indexOf, isEmpty, isValid, iterator, lastIndexOf, listIterator, listIterator, remove, remove, remove, removeAll, reset, retainAll, size, subList, toArray, toArray, toText, unmodifiableList
addChangeListener, clone, compareTo, getAllUserData, getID, getName, getUserData, putAllUserData, putUserData, removeChangeListener, removeUserData, setName, toString
addChangeListener, getAllUserData, getBoundsMax, getBoundsMin, getID, getLimitPoint, getName, getParDimension, getUnit, getUserData, isValid, putAllUserData, putUserData, removeChangeListener, removeUserData, setName, size, toText
public static PointComponent newInstance()
PointComponent
instance
(on the stack when executing in a StackContext
), that can store a list
of PointArray
objects.public static PointComponent newInstance(java.lang.String name)
PointComponent
instance
(on the stack when executing in a StackContext
) with the specified
name, that can store a list of PointArray
objects.name
- The name to be assigned to this list (may be null
).public static PointComponent valueOf(java.lang.String name, java.util.Collection<? extends PointArray> elements)
PointArray
objects in the specified
collection.name
- The name to be assigned to this list (may be null
).elements
- A collection of PointArray elements. May not be null.public static PointComponent valueOf(java.lang.String name, PointArray... elements)
PointArray
objects in the specified
array.name
- The name to be assigned to this list (may be null
).elements
- A list of PointArray elements. May not be null.public static PointComponent valueOf(PointArray... elements)
PointArray
objects in the specified
array.elements
- A list of PointArray elements. May not be null.public PointComponent getRange(int first, int last)
getRange
in interface GeometryList<PointComponent,PointArray>
getRange
in class AbstractGeomList<PointComponent,PointArray>
first
- index of the first element to return.last
- index of the last element to return.java.lang.IndexOutOfBoundsException
- if the given index is out of range (index < 0
|| index ≥ size())public PointComponent reverse()
PointString
with the elements in this list in reverse order.reverse
in interface GeometryList<PointComponent,PointArray>
reverse
in class AbstractGeomList<PointComponent,PointArray>
public PointComponent toDimension(int newDim)
newDim
- The dimension of the element to return.public PointComponent to(Unit<Length> unit)
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 PointComponent copy()
PointComponent
instance
allocated
by the calling thread
(possibly on the stack).public PointComponent copyToReal()
public int getNumberOfPanels() throws java.lang.IndexOutOfBoundsException
java.lang.IndexOutOfBoundsException
- if the strings in any array in this component
have different lengths.public PointComponent getTransformed(GTransform transform)
GeomTransform
and contains transformed versions of the contents of this
list as children.transform
- The transform to apply to this geometry element. May not be null.DimensionException
- if this element is not 3D.public PointArray set(int index, PointArray element)
PointArray
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.set
in interface java.util.List<PointArray>
set
in class AbstractPointGeomList<PointComponent,PointArray>
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.java.lang.IndexOutOfBoundsException
- - if index > size()
DimensionException
- if the input element's dimensions are different from
this list's dimensions.public void add(int index, PointArray value)
PointArray
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 list is not thread-safe).
add
in interface java.util.List<PointArray>
add
in class AbstractPointGeomList<PointComponent,PointArray>
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.java.lang.IndexOutOfBoundsException
- if index > size()
DimensionException
- if the input value dimensions are different from
this list's dimensions.public boolean addAll(int index, java.util.Collection<? extends PointArray> c)
PointArray
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. The
input elements must have the same physical dimensions as the other items in this
list, or an exception is thrown.addAll
in interface java.util.List<PointArray>
addAll
in class AbstractGeomList<PointComponent,PointArray>
index
- index at which to insert first element from the specified collection.c
- Elements to be inserted into this collection. May not be null.true
if this collection changed as a result of the call.DimensionException
- if the input element's dimensions are different from
this list's dimensions.public static void recycle(PointComponent instance)
instance
- The instance to be recycled.