|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.hedgehog.HObject
com.hedgehog.geo.PolygonType
public class PolygonType
Title: PolygonType - indicates the type of a polygon.
Description: Stores the type of a polygon, such as CONVEX.
Copyright: Copyright (c) Hedgehog Software 2007-2009.
Company: Hedgehog Software
| Field Summary | |
|---|---|
static int |
CONCAVE
Indicates a concave polygon. |
static int |
CONVEX
Indicates a convex polygon. |
static int |
CONVEX_QUADRILATERAL
Indicates a convex quadrilateral. |
protected int |
mPolygonType
Polygon type. |
static int |
QUADRILATERAL
Indicates a quadrilateral. |
static int |
REGULAR
Indicates a regular polygon. |
static int |
TRIANGLE
Indicates a triangle. |
static int |
UNKNOWN
Indicates an unknown polygon type. |
| Fields inherited from class com.hedgehog.HObject |
|---|
mID, mName |
| Constructor Summary | |
|---|---|
PolygonType()
Default constructor. |
|
PolygonType(int polygonType)
Constructor. |
|
PolygonType(PolygonType object)
Copy constuctor. |
|
| Method Summary | |
|---|---|
int |
getPolygonType()
Returns the polygon type. |
boolean |
isConcave()
Tests whether or not the polygon type is concave. |
boolean |
isConvex()
Tests whether or not the polygon type is convex. |
boolean |
isConvexQuadrilateral()
Tests whether or not the polygon type is a convex quadrilateral. |
boolean |
isQuadrilateral()
Tests whether or not the polygon type is a quadrilateral. |
boolean |
isRegular()
Tests whether or not the polygon type is a regular polygon. |
boolean |
isTriangle()
Tests whether or not the polygon type is a triangle. |
static boolean |
isValid(int polygonType)
Tests whether or not the specified type is valid. |
static java.lang.String |
polygonTypeString(int polygonType)
Returns a String equivalent of the specified polygon type. |
boolean |
setPolygonType(int polygonType)
Sets the polygon type. |
java.lang.String |
toString()
Returns a String representation of a PolygonType object. |
| Methods inherited from class com.hedgehog.HObject |
|---|
clone, compare, compareTo, copy, equals, getID, getName, hashCode, hasID, hasName, setID, setName |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected int mPolygonType
public static final int CONVEX
public static final int CONCAVE
public static final int TRIANGLE
public static final int QUADRILATERAL
public static final int CONVEX_QUADRILATERAL
public static final int REGULAR
public static final int UNKNOWN
| Constructor Detail |
|---|
public PolygonType()
public PolygonType(int polygonType)
throws java.lang.IllegalArgumentException
polygonType - Polygon type.
java.lang.IllegalArgumentException - Thrown if the specified polygon type is invalid.public PolygonType(PolygonType object)
object - Object to copy.| Method Detail |
|---|
public int getPolygonType()
public boolean setPolygonType(int polygonType)
polygonType - Polygon type.
public boolean isConvex()
public boolean isConcave()
public boolean isTriangle()
public boolean isQuadrilateral()
public boolean isConvexQuadrilateral()
public boolean isRegular()
public java.lang.String toString()
toString in class java.lang.Objectpublic static boolean isValid(int polygonType)
polygonType - Polygon type.
public static java.lang.String polygonTypeString(int polygonType)
polygonType - Regular polygon type.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||