Package org.apache.sis.metadata

## Enum TypeValuePolicy

- Object
- - Enum<TypeValuePolicy>
  - - TypeValuePolicy

- All Implemented Interfaces:
    `Serializable`, `Comparable<TypeValuePolicy>`

      public enum TypeValuePolicy
      extends Enum<TypeValuePolicy>

  The kind of values in the `MetadataStandard​.asTypeMap(…)`. This enumeration specifies whether the values shall be property types, element types (same as property types except for collections) or the declaring classes.
  Since:
    0.3
  See Also:
    `MetadataStandard​.asTypeMap(Class, KeyNamePolicy, TypeValuePolicy)`

  Defined in the `sis-metadata` module

- - ### Enum Constant Summary

    Enum Constants
    Enum Constant | Description
    --- | ---
    `DECLARING_CLASS` | The type of the class that declares the method.
    `DECLARING_INTERFACE` | The type of the interface that declares the method.
    `ELEMENT_TYPE` | The specialized type of a property, or type of elements if the property is a collection.
    `PROPERTY_TYPE` | The type of a property, as inferred from the return type of the property method defined in the interface.

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `static TypeValuePolicy` | `valueOf​(String name)` | Returns the enum constant of this type with the specified name.
    `static TypeValuePolicy[]` | `values()` | Returns an array containing the constants of this enum type, in the order they are declared.

    - ### Methods inherited from class Enum

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

    - ### Methods inherited from class Object

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

- - ### Enum Constant Detail

    - #### PROPERTY_TYPE

          public static final TypeValuePolicy PROPERTY_TYPE

      The type of a property, as inferred from the return type of the property method defined in the interface.

      Notes:

      - Collections are not handled in any special way: if the return type is a collection, then the property type is `Collection​.class` or any other declared return type.
      - As a special case, values of type `double` (the primitive type) in `GeographicBoundingBox` are wrapped in `Longitude` and `Latitude` objects instead of `Double`.

    - #### ELEMENT_TYPE

          public static final TypeValuePolicy ELEMENT_TYPE

      The specialized type of a property, or type of elements if the property is a collection. This is the same type than `PROPERTY_TYPE` except for the following:
      - If the property is a collection, then the element type is the type of elements in that collection. For example if the property type is `Collection<String>`, then the element type is `String`.
      - If the implementation declares a more specific property type than the interface (as allowed by covariant return type), then the element type will be that specialized type.

    - #### DECLARING_INTERFACE

          public static final TypeValuePolicy DECLARING_INTERFACE

      The type of the interface that declares the method. For any metadata object, different properties may have different declaring interfaces if some properties were inherited from parent interfaces.

    - #### DECLARING_CLASS

          public static final TypeValuePolicy DECLARING_CLASS

      The type of the class that declares the method. This is similar to `DECLARING_INTERFACE`, except that the implementation class from the metadata standard is returned instead than the interface.

  - ### Method Detail

    - #### values

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

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

    - #### valueOf

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