Package uk.ac.starlink.ttools.plot2.data
Enum Area.Type
- All Implemented Interfaces:
Serializable
,Comparable<Area.Type>
,java.lang.constant.Constable
- Enclosing class:
Area
Available shape types.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionCircle defined by central point and a radius (x, y, r).Multi-Order Coverage map; each array element contains 64-bit NUNIQ bit pattern equivalenced to the double value.Point defined by two coordinates (x, y).Polygon or sequence of polygons defined by a list of vertices (x1, y1, x2, y2, ..., xN, yN). -
Method Summary
Modifier and TypeMethodDescriptionstatic 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
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.
-
Enum Constant Details
-
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
Circle defined by central point and a radius (x, y, r). -
POINT
Point defined by two coordinates (x, y). -
MOC
Multi-Order Coverage map; each array element contains 64-bit NUNIQ bit pattern equivalenced to the double value.
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
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
-
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
Retrieves an instance of this enum from its numeric code.- Parameters:
itype
- type ordinal- Returns:
- type instance
-