org.apache.commons.math3.geometry.euclidean.twod
Enum EnumPolygon

java.lang.Object
  extended by java.lang.Enum<EnumPolygon>
      extended by org.apache.commons.math3.geometry.euclidean.twod.EnumPolygon
All Implemented Interfaces:
Serializable, Comparable<EnumPolygon>

public enum EnumPolygon
extends Enum<EnumPolygon>

Define the type of 2D polygon

Since:
3.2
Version:
$Id: EnumPolygon.java 17601 2017-05-18 07:27:52Z bignon $

Enum Constant Summary
CONCAVE
          Well formed polygon (not degenerated, nor crossing), and concave
CONVEX
          Well formed polygon (not degenerated, nor crossing), and convex
CROSSING_BORDER
          Polygon with crossing border
DEGENERATED
          Degenerated Polygon : area is near zero
 
Method Summary
 String getName()
          Getter for the enumerate name.
 boolean isWellFormed()
          A well formed polygon is CONCAVE or CONVEX
static EnumPolygon valueOf(String name)
          Returns the enum constant of this type with the specified name.
static EnumPolygon[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

DEGENERATED

public static final EnumPolygon DEGENERATED
Degenerated Polygon : area is near zero


CROSSING_BORDER

public static final EnumPolygon CROSSING_BORDER
Polygon with crossing border


CONVEX

public static final EnumPolygon CONVEX
Well formed polygon (not degenerated, nor crossing), and convex


CONCAVE

public static final EnumPolygon CONCAVE
Well formed polygon (not degenerated, nor crossing), and concave

Method Detail

values

public static EnumPolygon[] 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 (EnumPolygon c : EnumPolygon.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static EnumPolygon 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 name
NullPointerException - if the argument is null

getName

public String getName()
Getter for the enumerate name.

Returns:
name

isWellFormed

public boolean isWellFormed()
A well formed polygon is CONCAVE or CONVEX

Returns:
boolean to indicate if polygon is well formed


Copyright © 2017 CNES. All Rights Reserved.