|
||||||||
| 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<E>
java.util.AbstractSequentialList<E>
java.util.LinkedList<PointType>
Polygon<PointType>
public class Polygon<PointType extends Point>
A LinkedList of Points
| Field Summary |
|---|
| Fields inherited from class java.util.AbstractList |
|---|
modCount |
| Constructor Summary | |
|---|---|
Polygon()
The null Polygon |
|
Polygon(java.util.Collection<? extends PointType> poly)
Construct from a collection of Points. |
|
| Method Summary | |
|---|---|
double |
areaPoly2()
Twice the area of the Polygon. |
double |
areaPolygon2()
Twice the area of the Polygon (using Green's Theorem). |
boolean |
diagonal(PointType a,
PointType b)
Is the polygon edge segment ab an internal diagonal. |
PointType |
getRelative(PointType p,
int offset)
Circular reference relative to a given Point |
java.lang.String |
toString()
Format the polygon. |
java.lang.String |
toString(java.lang.String df)
Format the polygon using a hint. |
| Methods inherited from class java.util.LinkedList |
|---|
add, add, addAll, addAll, addFirst, addLast, clear, clone, contains, element, get, getFirst, getLast, indexOf, lastIndexOf, listIterator, offer, peek, poll, remove, remove, remove, removeFirst, removeLast, set, size, toArray, toArray |
| Methods inherited from class java.util.AbstractSequentialList |
|---|
iterator |
| Methods inherited from class java.util.AbstractList |
|---|
equals, hashCode, listIterator, removeRange, subList |
| Methods inherited from class java.util.AbstractCollection |
|---|
containsAll, isEmpty, removeAll, retainAll |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface java.util.List |
|---|
containsAll, equals, hashCode, isEmpty, iterator, listIterator, removeAll, retainAll, subList |
| Constructor Detail |
|---|
public Polygon(java.util.Collection<? extends PointType> poly)
poly - collection of Pointspublic Polygon()
| Method Detail |
|---|
public java.lang.String toString(java.lang.String df)
df - the format to be used for a single coordinatepublic java.lang.String toString()
toString in class java.util.AbstractCollection<PointType extends Point>
public PointType getRelative(PointType p,
int offset)
p - reference Pointoffset - index relative to ppublic double areaPoly2()
public double areaPolygon2()
public boolean diagonal(PointType a,
PointType b)
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||