Module org.dyn4j

Enum MonotoneChainType

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<MonotoneChainType>

    enum MonotoneChainType
    extends java.lang.Enum<MonotoneChainType>
    Enumeration of monotone chain types.

    A monotone chain is a group of vertices that are monotone with respect to some axis. Typically x or y monotone chains are created.

    A monotone polygon will always contain two monotone chains. For a y-monotone polygon, a LEFT and RIGHT. For a x-monotone polygon, a TOP and BOTTOM.

    Since:
    3.2.0
    Version:
    3.2.0
    Author:
    William Bittle
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      BOTTOM
      Indicates that the vertex is on the bottom chain of a x-monotone polygon
      LEFT
      Indicates that the vertex is on the left chain of a y-monotone polygon
      RIGHT
      Indicates that the vertex is on the right chain of a y-monotone polygon
      TOP
      Indicates that the vertex is on the top chain of a x-monotone polygon
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static MonotoneChainType valueOf​(java.lang.String name)
      Returns the enum constant of this type with the specified name.
      static MonotoneChainType[] 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

      • LEFT

        public static final MonotoneChainType LEFT
        Indicates that the vertex is on the left chain of a y-monotone polygon
      • RIGHT

        public static final MonotoneChainType RIGHT
        Indicates that the vertex is on the right chain of a y-monotone polygon
      • TOP

        public static final MonotoneChainType TOP
        Indicates that the vertex is on the top chain of a x-monotone polygon
      • BOTTOM

        public static final MonotoneChainType BOTTOM
        Indicates that the vertex is on the bottom chain of a x-monotone polygon
    • Method Detail

      • values

        public static MonotoneChainType[] 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 (MonotoneChainType c : MonotoneChainType.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static MonotoneChainType 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