Package org.tinfour.utils
Enum Polyside.Result
- java.lang.Object
-
- java.lang.Enum<Polyside.Result>
-
- org.tinfour.utils.Polyside.Result
-
- All Implemented Interfaces:
Serializable,Comparable<Polyside.Result>
- Enclosing class:
- Polyside
public static enum Polyside.Result extends Enum<Polyside.Result>
An enumeration indicating the result of a point-in-poygon test
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanisCovered()Indicates whether the polygon covers the specified coordinatesstatic Polyside.ResultvalueOf(String name)Returns the enum constant of this type with the specified name.static Polyside.Result[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
Outside
public static final Polyside.Result Outside
The point is unambiguously outside the polygon
-
Inside
public static final Polyside.Result Inside
The point is unambiguously inside the polygon
-
Edge
public static final Polyside.Result Edge
The point is on the edge of the polygon
-
-
Method Detail
-
values
public static Polyside.Result[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (Polyside.Result c : Polyside.Result.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static Polyside.Result valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
isCovered
public boolean isCovered()
Indicates whether the polygon covers the specified coordinates- Returns:
- true if the polygon is on the inside or on the edge of the polygon; false if it is unambiguously outside the polygon.
-
-