T
- The type of this list.E
- The type of elements contained in this list.public interface GeometryList<T extends GeometryList,E extends GeomElement> extends GeomElement<T>, java.util.List<E>, Transformable<T>
GeomElement
objects. The list
will not accept the addition of null
elements.
Modified by: Joseph A. Huwaldt
Modifier and Type | Method and Description |
---|---|
boolean |
add(E... array)
Appends all of the elements in the specified list of arguments to this
geometry element list.
|
boolean |
add(int index,
E... array)
Inserts all of the
GeomElement objects in the specified list of
arguments 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(int index,
E[] arr)
Inserts all of the
GeomElement objects in the specified
array into this list at the specified position. |
boolean |
containsGeometry()
Returns
true if this list actually contains any geometry and
false if this list is empty or contains only non-geometry
items such as empty lists. |
E |
get(java.lang.String name)
Returns the element with the specified name from this list.
|
GeomList<E> |
getAll()
Returns a new
GeomList with the elements in this list. |
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.
|
T |
getRange(int first,
int last)
Returns the range of elements in this list from the specified start and
ending indexes.
|
E |
remove(java.lang.String name)
Removes the element with the specified name from this list.
|
T |
reverse()
Returns a new
GeomList with the elements in this list in reverse
order. |
T |
to(Unit<Length> unit)
Returns the equivalent to this list object but stated in the specified
unit.
|
T |
toDimension(int newDim)
Return a copy of this list converted to the specified number of physical
dimensions.
|
java.util.List<E> |
unmodifiableList()
Returns an unmodifiable list view associated to this list.
|
add, add, addAll, addAll, clear, contains, containsAll, equals, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray
getTransformed
addChangeListener, copy, copyToReal, getAllUserData, getBoundsMax, getBoundsMin, getID, getLimitPoint, getName, getParDimension, getPhyDimension, getUnit, getUserData, isValid, putAllUserData, putUserData, removeChangeListener, removeUserData, setName, size, toText
T to(Unit<Length> unit) throws ConversionException
to
in interface GeomElement<T extends GeometryList>
unit
- the length unit of the list object to be returned.ConversionException
- if the the input unit is not a length unit.T toDimension(int newDim)
toDimension
in interface GeomElement<T extends GeometryList>
newDim
- The dimension of the list element to return.boolean containsGeometry()
true
if this list actually contains any geometry and
false
if this list is empty or contains only non-geometry
items such as empty lists.T getRange(int first, int last)
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()
E getFirst()
E getLast()
E get(java.lang.String name)
name
- The name of the element we are looking for in the list.null
is returned.E remove(java.lang.String name)
name
- the name of the element to remove.boolean add(E... array)
array
- elements to be inserted into this collection. May not be null.true
if this collection changed as a result of the call.boolean add(int index, E... array)
GeomElement
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.index
- index at which to insert first element from the specified array.array
- elements to be inserted into this collection. May not be null.true
if this collection changed as a result of the call.boolean addAll(E[] arr)
arr
- elements to be inserted into this collection. May not be null.true
if this collection changed as a result of the call.boolean addAll(int index, E[] arr)
GeomElement
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.index
- index at which to insert first element from the specified
collection.arr
- elements to be inserted into this collection. May not be null.true
if this collection changed as a result of the call.java.util.List<E> unmodifiableList()
GeomList<E> getAll()
GeomList
with the elements in this list.T reverse()
GeomList
with the elements in this list in reverse
order.int getIndexFromName(java.lang.String name)
null
names are ignored.name
- The name of the geometry element to find in this list