# Enum Class ElementKind

Object
Enum<ElementKind>
ElementKind

All Implemented Interfaces:
  `Serializable`, `Comparable<ElementKind>`, `Constable`

public enum ElementKind extends Enum<ElementKind>
Kind of an element in a Well Known Text. Different kinds of elements can be associated to different colors.

Since:
  0.4

- ## Nested Class Summary

  ### Nested classes/interfaces inherited from class Enum

  `Enum​.EnumDesc<E extends Enum<E>>`

- ## Enum Constant Summary

  Enum Constants
  Enum Constant
  Description
  `AXIS`
  Coordinate system axes, often represented by `AXIS[…]` elements.
  `CITATION`
  Citation (typically for the authority), often represented by `CITATION[…]` elements.
  `CODE_LIST`
  Code list values.
  `DATUM`
  Datum or reference frame, often represented by `DATUM[…]` elements.
  `ENSEMBLE`
  Ensemble of datum or reference frames, represented by `ENSEMBLE[…]` elements.
  `ERROR`
  Unformattable elements.
  `EXTENT`
  CRS, datum or operation domain of validity, often represented by `AREA[…]` or `BBOX[…]` elements.
  `IDENTIFIER`
  Object identifier, typically written almost last just before remarks.
  `INTEGER`
  Integer numbers.
  `METHOD`
  Operation methods, often represented by `PROJECTION[…]` elements.
  `NAME`
  Object name, typically written immediately after the WKT keyword and its opening bracket.
  `NUMBER`
  Floating point numbers (excluding integer types).
  `PARAMETER`
  Name of parameters, often represented by `PARAMETER[…]` elements.
  `REMARKS`
  Remarks, often represented by `REMARKS[…]` elements.
  `SCOPE`
  CRS, datum or operation scope, often represented by `SCOPE[…]` elements.
  `UNIT`
  Units of measurement, often represented by `UNIT[…]` elements.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static ElementKind`
  `forType(Class<?> type)`
  Returns the element kind for an object of the given type.
  `static ElementKind`
  `valueOf(String name)`
  Returns the enum constant of this class with the specified name.
  `static ElementKind[]`
  `values()`
  Returns an array containing the constants of this enum class, in the order they are declared.

  ### Methods inherited from class Enum

  `clone, compareTo, describeConstable, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf`

  ### Methods inherited from class Object

  `getClass, notify, notifyAll, wait, wait, wait`

- ## Enum Constant Details

  - ### NAME

    public static final ElementKind NAME
    Object name, typically written immediately after the WKT keyword and its opening bracket.

  - ### IDENTIFIER

    public static final ElementKind IDENTIFIER
    Object identifier, typically written almost last just before remarks.

  - ### NUMBER

    public static final ElementKind NUMBER
    Floating point numbers (excluding integer types).

  - ### INTEGER

    public static final ElementKind INTEGER
    Integer numbers.

  - ### UNIT

    public static final ElementKind UNIT
    Units of measurement, often represented by `UNIT[…]` elements.
    See Also:
      - `Unit`

  - ### AXIS

    public static final ElementKind AXIS
    Coordinate system axes, often represented by `AXIS[…]` elements.
    See Also:
      - `DefaultCoordinateSystemAxis`

  - ### CODE_LIST

    public static final ElementKind CODE_LIST
    Code list values.
    See Also:
      - `CodeList`

  - ### PARAMETER

    public static final ElementKind PARAMETER
    Name of parameters, often represented by `PARAMETER[…]` elements.
    See Also:
      - `AbstractParameterDescriptor`

  - ### METHOD

    public static final ElementKind METHOD
    Operation methods, often represented by `PROJECTION[…]` elements.
    See Also:
      - `DefaultOperationMethod`

  - ### DATUM

    public static final ElementKind DATUM
    Datum or reference frame, often represented by `DATUM[…]` elements.
    See Also:
      - `AbstractDatum`

  - ### ENSEMBLE

    public static final ElementKind ENSEMBLE
    Ensemble of datum or reference frames, represented by `ENSEMBLE[…]` elements.
    Since:
      1.5
    See Also:
      - `DefaultDatumEnsemble`

  - ### SCOPE

    public static final ElementKind SCOPE
    CRS, datum or operation scope, often represented by `SCOPE[…]` elements.
    See Also:
      - `DefaultObjectDomain​.getScope()`

  - ### EXTENT

    public static final ElementKind EXTENT
    CRS, datum or operation domain of validity, often represented by `AREA[…]` or `BBOX[…]` elements.
    See Also:
      - `DefaultObjectDomain​.getDomainOfValidity()`

  - ### CITATION

    public static final ElementKind CITATION
    Citation (typically for the authority), often represented by `CITATION[…]` elements.
    See Also:
      - `ImmutableIdentifier​.getAuthority()`

  - ### REMARKS

    public static final ElementKind REMARKS
    Remarks, often represented by `REMARKS[…]` elements.

    When formatting an ISO 19162 Well Known Text, texts quoted as remarks preserve non-ASCII characters. By contrast, quoted texts in any other `ElementKind` will have some non-ASCII characters replaced by ASCII ones (e.g. "é" → "e").

    See Also:
      - `AbstractIdentifiedObject​.getRemarks()`

  - ### ERROR

    public static final ElementKind ERROR
    Unformattable elements.

- ## Method Details

  - ### values

    public static ElementKind[] values()
    Returns an array containing the constants of this enum class, in the order they are declared.
    Returns:
      an array containing the constants of this enum class, in the order they are declared

  - ### valueOf

    public static ElementKind valueOf(String name)
    Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified name
      `NullPointerException` - if the argument is null

  - ### forType

    public static ElementKind forType(Class<?> type)
    Returns the element kind for an object of the given type. The current implementation defines the following associations:

    Mapping from Java type to WKT element
    Base type | Kind
    --- | ---
    `Datum` | `DATUM`
    `DefaultDatumEnsemble` | `ENSEMBLE`
    `OperationMethod` | `METHOD`
    `GeneralParameterValue` | `PARAMETER`
    `CoordinateSystemAxis` | `AXIS`
    `Identifier` | `IDENTIFIER`
    `Citation` | `CITATION`
    `CodeList` | `CODE_LIST`
    `Extent` | `EXTENT`
    `Unit` | `UNIT`
    `Number` | `INTEGER` or `NUMBER`

    The given type can be any sub-type of the above types. If an object implements more than one of the above interfaces, then the selected `ElementKind` is arbitrary.
    Parameters:
      `type` - the object type, or `null`.
    Returns:
      the element kind of the given type, or `null` if none match.