public abstract class GeomElementList extends java.util.AbstractList implements GeomElement
Modified by: Joseph A. Huwaldt
Modifier and Type | Field and Description |
---|---|
protected java.util.List |
subElements
Array of sub-elements.
|
Modifier | Constructor and Description |
---|---|
protected |
GeomElementList()
Create an empty geometry element list (one that does not contain any sub-elements).
|
protected |
GeomElementList(java.lang.String name)
Create an empty geometry element list with the specified name.
|
Modifier and Type | Method and Description |
---|---|
void |
clear()
Removes all the sub-elements from this geometry element.
|
java.lang.Object |
clone()
Make a copy of this geometry element object.
|
boolean |
equals(java.lang.Object obj)
Compares the specified object with this list for equality.
|
java.lang.Object |
get(int index)
Returns the sub-element at the specified position in this geometry element.
|
java.util.Map |
getAllData()
Returns a reference to a Map containing all application specific objects associated
with this geometry element.
|
double |
getArea()
Return the surface area of this geometry element.
|
GeomPoint |
getBoundsMax()
Return the coordinate point representing the maximum bounding box corner (max X,
max Y, max Z).
|
GeomPoint |
getBoundsMin()
Return the coordinate point representing the minimum bounding box corner (min X,
min Y, min Z).
|
java.lang.Object |
getData(java.lang.Object key)
Return the application specific object associated with the specified key that has
been assigned to this geometry element.
|
double |
getMaxX()
Return the maximum bounding X coordinate for this geometry element.
|
double |
getMaxY()
Return the maximum bounding Y coordinate for this geometry element.
|
double |
getMaxZ()
Return the maximum bounding Z coordinate for this geometry element.
|
double |
getMinX()
Return the minimum bounding X coordinate for this geometry element.
|
double |
getMinY()
Return the minimum bounding Y coordinate for this geometry element.
|
double |
getMinZ()
Return the minimum bounding Z coordinate for this geometry element.
|
java.lang.String |
getName()
Return the name of this geometry element.
|
int |
getNumberOfPanels()
Return the total number of panels in this geometry element.
|
int |
hashCode()
Returns the hash code value for this geometry element.
|
java.util.Iterator |
iterator()
Return an enumeration of all the sub-elements in this geometry element.
|
void |
putData(java.lang.Object key,
java.lang.Object data)
Store application specific data that can be assigned to this geometry element.
|
java.lang.Object |
remove(int index)
Remove the sub-element at the specified position in this geometry element.
|
void |
scale(double sx,
double sy,
double sz)
Scale this element by the given scale factor in each axis direction.
|
void |
setName(java.lang.String newName)
Change the name of this geometry element.
|
int |
size()
Returns the number of sub-elements in this geometry element.
|
java.lang.String |
toString()
Create a string representation of this geometry element by outputting the element's
name and it's bounding rectangle coordinates.
|
void |
translate(double dx,
double dy,
double dz)
Translate this element by an incremental amount along each axis.
|
add, add, addAll, indexOf, lastIndexOf, listIterator, listIterator, removeRange, set, subList
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray
protected GeomElementList()
protected GeomElementList(java.lang.String name)
public int size()
size
in interface java.util.Collection
size
in interface java.util.List
size
in class java.util.AbstractCollection
public java.lang.Object get(int index)
get
in interface java.util.List
get
in class java.util.AbstractList
index
- The index of the sub-element to return.public java.lang.Object remove(int index)
remove
in interface java.util.List
remove
in class java.util.AbstractList
index
- The index of the sub-element to remove.public void clear()
clear
in interface java.util.Collection
clear
in interface java.util.List
clear
in class java.util.AbstractList
public java.util.Iterator iterator()
iterator
in interface java.lang.Iterable
iterator
in interface java.util.Collection
iterator
in interface java.util.List
iterator
in class java.util.AbstractList
public java.lang.String getName()
getName
in interface GeomElement
public void setName(java.lang.String newName)
setName
in interface GeomElement
newName
- The new name to be given to this geometry element.public int getNumberOfPanels()
getNumberOfPanels
in interface GeomElement
public double getArea()
getArea
in interface GeomElement
public double getMinX()
getMinX
in interface GeomElement
public double getMaxX()
getMaxX
in interface GeomElement
public double getMinY()
getMinY
in interface GeomElement
public double getMaxY()
getMaxY
in interface GeomElement
public double getMinZ()
getMinZ
in interface GeomElement
public double getMaxZ()
getMaxZ
in interface GeomElement
public GeomPoint getBoundsMin()
getBoundsMin
in interface GeomElement
public GeomPoint getBoundsMax()
getBoundsMax
in interface GeomElement
public void translate(double dx, double dy, double dz)
translate
in interface GeomElement
dx
- The amount to translate in the X direction.dy
- The amount to translate in the Y direction.dz
- The amount to translate in the Z direction.public void scale(double sx, double sy, double sz)
scale
in interface GeomElement
sx
- The amount to scale the element in the X direction.sy
- The amount to scale the element in the Y direction.sz
- The amount to scale the element in the Z direction.public void putData(java.lang.Object key, java.lang.Object data)
putData
in interface GeomElement
key
- The key used to store and retrieve the application specific data
assigned to this geometry element.data
- The application specific object to be assigned to this geometry
element.public java.lang.Object getData(java.lang.Object key)
getData
in interface GeomElement
key
- The key used to store and retrieve the application specific data.public java.util.Map getAllData()
getAllData
in interface GeomElement
public java.lang.String toString()
toString
in class java.util.AbstractCollection
public boolean equals(java.lang.Object obj)
true
if and only if the specified object is also a GeomElementList and
both lists have the same contents.equals
in interface java.util.Collection
equals
in interface java.util.List
equals
in class java.util.AbstractList
obj
- The object to be compared for equality with this list.true
if the specified object is equal to this this.public int hashCode()
hashCode
in interface java.util.Collection
hashCode
in interface java.util.List
hashCode
in class java.util.AbstractList
public java.lang.Object clone()
clone
in interface GeomElement
clone
in class java.lang.Object