|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.util.AbstractCollection<E>
java.util.AbstractList<V>
net.von_gagern.martin.confoo.mesh.SimpleTriangle<V>
V - the class used to represent triangle verticespublic class SimpleTriangle<V>
Simple implementation for triangles of a mesh.
An arbitrary type may be used to identify indices, and the corners
can be identified through their index. For coordinates of the
corner, the corresponding LocatedMesh should be queried.
Beside access to the corners as required by
LocatedMesh, this implementation also provides access
to the corners in form of a List.
| Field Summary |
|---|
| Fields inherited from class java.util.AbstractList |
|---|
modCount |
| Constructor Summary | |
|---|---|
SimpleTriangle(V c1,
V c2,
V c3)
|
|
| Method Summary | |
|---|---|
static boolean |
equal(CorneredTriangle<?> t1,
CorneredTriangle<?> t2)
Equality comparison for cornered triangles. |
boolean |
equals(Object o)
Compare two simple triangles for equality. |
V |
get(int index)
Get specified corner. |
V |
getCorner(int index)
Get specified corner. |
int |
hashCode()
Calculate hash code of triangle. |
int |
size()
Count corners. |
| Methods inherited from class java.util.AbstractList |
|---|
add, add, addAll, clear, indexOf, iterator, lastIndexOf, listIterator, listIterator, remove, removeRange, set, subList |
| Methods inherited from class java.util.AbstractCollection |
|---|
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface java.util.List |
|---|
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray |
| Constructor Detail |
|---|
public SimpleTriangle(V c1,
V c2,
V c3)
| Method Detail |
|---|
public V getCorner(int index)
getCorner in interface CorneredTriangle<V>index - the index of the corner requested
IndexOutOfBoundsException - unless 0 <= index < 3public V get(int index)
getCorner(int) in order to
implement the List interface.
get in interface List<V>get in class AbstractList<V>index - the index of the corner requested
IndexOutOfBoundsException - unless 0 <= index < 3public int size()
size in interface Collection<V>size in interface List<V>size in class AbstractCollection<V>public int hashCode()
equals(java.lang.Object) method. It is based on the
hash codes of the three corner vertices.
hashCode in interface Collection<V>hashCode in interface List<V>hashCode in class AbstractList<V>public boolean equals(Object o)
SimpleTriangle will be considered equal to a
SimpleTriangle in order to not break the symmetry
of equals.
equals in interface Collection<V>equals in interface List<V>equals in class AbstractList<V>o - another object
public static boolean equal(CorneredTriangle<?> t1,
CorneredTriangle<?> t2)
null is equal only to null.
This static method can be used by implementations of
CorneredTriangle that wish to implement the same
equality semantics. It can also be used by applications that
wish to use this semantics regardless of the actual triangle
implementation in use.
t1 - one trianglet2 - a second triangle
Object.equals(java.lang.Object)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||