org.shapelogic.util
Enum PointType

java.lang.Object
  extended by java.lang.Enum<PointType>
      extended by org.shapelogic.util.PointType
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<PointType>, OHInterface

public enum PointType
extends java.lang.Enum<PointType>
implements OHInterface

Enum for with types for Points. This could change quite a bit

Author:
Sami Badawi

Enum Constant Summary
ARROW_JUNCTION
          3 lines meet less than 180 degrees between all of them
END_POINT
          point is an end point, maybe later there should be a distinction between end points and have nothing else close by and end points that have close neighbors
HARD_CORNER
          If the point has a sharp angle for now 30 degrees is set as the limit
SOFT_POINT
          If it is not a hard point
T_JUNCTION
          3 lines meet 2 are collinear and the last is somewhat orthogonal
U_JUNCTION
          3 or more lines meets, U is for unknown
UNKNOWN
          Before a type is determined
Y_JUNCTION
          3 lines meet, not a T junction
 
Method Summary
 java.lang.String getOhName()
           
static PointType valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static PointType[] 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

UNKNOWN

public static final PointType UNKNOWN
Before a type is determined


HARD_CORNER

public static final PointType HARD_CORNER
If the point has a sharp angle for now 30 degrees is set as the limit


SOFT_POINT

public static final PointType SOFT_POINT
If it is not a hard point


U_JUNCTION

public static final PointType U_JUNCTION
3 or more lines meets, U is for unknown


T_JUNCTION

public static final PointType T_JUNCTION
3 lines meet 2 are collinear and the last is somewhat orthogonal


ARROW_JUNCTION

public static final PointType ARROW_JUNCTION
3 lines meet less than 180 degrees between all of them


Y_JUNCTION

public static final PointType Y_JUNCTION
3 lines meet, not a T junction


END_POINT

public static final PointType END_POINT
point is an end point, maybe later there should be a distinction between end points and have nothing else close by and end points that have close neighbors

Method Detail

values

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

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

valueOf

public static PointType valueOf(java.lang.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:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
java.lang.NullPointerException - if the argument is null

getOhName

public java.lang.String getOhName()
Specified by:
getOhName in interface OHInterface


Copyright © 2009. All Rights Reserved.