net.sf.okapi.common.resource

## Class TargetPropertiesAnnotation

- java.lang.Object
- - net.sf.okapi.common.resource.TargetPropertiesAnnotation

- All Implemented Interfaces:
    java.lang.Iterable<LocaleId>, IAnnotation

      public class TargetPropertiesAnnotation
      extends java.lang.Object
      implements IAnnotation, java.lang.Iterable<LocaleId>

  The target properties associated to a set of source properties in a resource.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `TargetPropertiesAnnotation()` Creates a new TargetPropertiesAnnotation object.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.util.Map<java.lang.String,Property>` | `get(LocaleId locId)` Gets the properties for a given target locale.
    `java.util.Set<LocaleId>` | `getLocales()` Gets a set of the target locales available in this annotation.
    `boolean` | `isEmpty()` Indicates if this annotation has any properties.
    `java.util.Iterator<LocaleId>` | `iterator()` Gets a new iterator for this annotation.
    `void` | `set(LocaleId locId, java.util.Map<java.lang.String,Property> properties)` Sets properties for a given target locale.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

    - ### Methods inherited from interface net.sf.okapi.common.annotation.IAnnotation

      `toString`

- - ### Constructor Detail

    - #### TargetPropertiesAnnotation

          public TargetPropertiesAnnotation()

      Creates a new TargetPropertiesAnnotation object.

  - ### Method Detail

    - #### set

          public void set(LocaleId locId,
                 java.util.Map<java.lang.String,Property> properties)

      Sets properties for a given target locale.
      Parameters:
        `locId` - Code of the target locale for this property.
        `properties` - The properties to set.

    - #### get

          public java.util.Map<java.lang.String,Property> get(LocaleId locId)

      Gets the properties for a given target locale.
      Parameters:
        `locId` - Code of the target locale of the properties to retrieve.
      Returns:
        The properties, or null if none has been found.

    - #### isEmpty

          public boolean isEmpty()

      Indicates if this annotation has any properties.
      Returns:
        True if this annotation counts at least one property.

    - #### iterator

          public java.util.Iterator<LocaleId> iterator()

      Gets a new iterator for this annotation.
      Specified by:
        `iterator` in interface `java.lang.Iterable<LocaleId>`

    - #### getLocales

          public java.util.Set<LocaleId> getLocales()

      Gets a set of the target locales available in this annotation.
      Returns:
        A set of the target locales in this annotation.