Enum Area.Type

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<Area.Type>
    Enclosing class:
    Area

    public static enum Area.Type
    extends java.lang.Enum<Area.Type>
    Available shape types.
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      CIRCLE
      Circle defined by central point and a radius (x, y, r).
      MOC
      Multi-Order Coverage map; each array element contains 64-bit NUNIQ bit pattern equivalenced to the double value.
      POINT
      Point defined by two coordinates (x, y).
      POLYGON
      Polygon or sequence of polygons defined by a list of vertices (x1, y1, x2, y2, ..., xN, yN).
    • Method Summary

      All Methods Static Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      static Area.Type fromInt​(int itype)
      Retrieves an instance of this enum from its numeric code.
      abstract boolean isLegalArrayLength​(int n)
      Indicates whether a given data array length can represent a shape of this type.
      static Area.Type valueOf​(java.lang.String name)
      Returns the enum constant of this type with the specified name.
      static Area.Type[] 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

      • POLYGON

        public static final Area.Type POLYGON
        Polygon or sequence of polygons defined by a list of vertices (x1, y1, x2, y2, ..., xN, yN). If a coordinate pair (xA,yA) are both NaN, it indicates a break between polygons: so for instance (0,0, 0,1, 1,0, NaN,NaN, 2,2, 2,3, 3,2) defines two disjoint triangles. Breaks may not occur at the start or end of the array, or adjacent to each other.
      • CIRCLE

        public static final Area.Type CIRCLE
        Circle defined by central point and a radius (x, y, r).
      • POINT

        public static final Area.Type POINT
        Point defined by two coordinates (x, y).
      • MOC

        public static final Area.Type MOC
        Multi-Order Coverage map; each array element contains 64-bit NUNIQ bit pattern equivalenced to the double value.
    • Method Detail

      • values

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

        public static Area.Type 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
      • isLegalArrayLength

        public abstract boolean isLegalArrayLength​(int n)
        Indicates whether a given data array length can represent a shape of this type.
        Parameters:
        n - length of candidate array
        Returns:
        true iff this shape can be represented by a data array of the given length
      • fromInt

        public static Area.Type fromInt​(int itype)
        Retrieves an instance of this enum from its numeric code.
        Parameters:
        itype - type ordinal
        Returns:
        type instance