Package net.sf.okapi.common.resource
Class TargetPropertiesAnnotation
- java.lang.Object
-
- net.sf.okapi.common.resource.TargetPropertiesAnnotation
-
- All Implemented Interfaces:
Cloneable,Iterable<LocaleId>,IAnnotation
public class TargetPropertiesAnnotation extends Object implements IAnnotation, Iterable<LocaleId>
The target properties associated to a set of source properties in a resource.
-
-
Constructor Summary
Constructors Constructor Description TargetPropertiesAnnotation()Creates a new TargetPropertiesAnnotation object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Map<String,Property>get(LocaleId locId)Gets the properties for a given target locale.Set<LocaleId>getLocales()Gets a set of the target locales available in this annotation.booleanisEmpty()Indicates if this annotation has any properties.Iterator<LocaleId>iterator()Gets a new iterator for this annotation.voidset(LocaleId locId, Map<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
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
Method Detail
-
set
public void set(LocaleId locId, Map<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 Map<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.
-
-