public class LocalizedFeature extends Feature
Locale parameter will operate on current data locale.assignment, code, name| Constructor and Description |
|---|
LocalizedFeature(ClassAttributeAssignmentModel assignment,
java.util.Map<java.util.Locale,java.util.List<FeatureValue>> values,
java.util.Locale currentLocale)
Instantiates a new localized typed feature.
|
LocalizedFeature(java.lang.String code,
java.util.Map<java.util.Locale,java.util.List<FeatureValue>> values,
java.util.Locale currentLocale)
Instantiates a new localized untyped feature.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addValue(FeatureValue fvalue)
Add to this feature a
FeatureValue |
void |
addValue(FeatureValue fvalue,
java.util.Locale locale) |
void |
addValue(int index,
FeatureValue fvalue)
Inserts the
FeatureValueat the specified index position in this list (optional operation). |
void |
addValue(int index,
FeatureValue fvalue,
java.util.Locale locale) |
FeatureValue |
getValue()
Convenience method to return a single value.
|
FeatureValue |
getValue(java.util.Locale locale) |
java.util.List<FeatureValue> |
getValues()
Returns the list of feature values.
|
java.util.List<FeatureValue> |
getValues(java.util.Locale locale)
Gets the list of feature values for particular locale.
|
java.util.Map<java.util.Locale,java.util.List<FeatureValue>> |
getValuesForAllLocales()
Gets the whole map of values where key is
Locale and value list of feature values. |
void |
removeAllValues()
Remove all containing
FeatureValues from the current feature. |
void |
removeAllValues(java.util.Locale locale) |
boolean |
removeValue(FeatureValue fvalue)
Removes the first occurrence of the given
FeatureValue from the feature, if it is present (optional
operation). |
boolean |
removeValue(FeatureValue fvalue,
java.util.Locale locale) |
void |
setValues(java.util.List<FeatureValue> fvalues)
Clears always all
FeatureValue of this Feature and add the given List with FeatureValues to this Feature. |
void |
setValues(java.util.List<FeatureValue> fvalues,
java.util.Locale locale) |
getClassAttributeAssignment, getCode, getName, toStringpublic LocalizedFeature(ClassAttributeAssignmentModel assignment, java.util.Map<java.util.Locale,java.util.List<FeatureValue>> values, java.util.Locale currentLocale)
assignment - the assignmentvalues - the valuescurrentLocale - the current localepublic LocalizedFeature(java.lang.String code,
java.util.Map<java.util.Locale,java.util.List<FeatureValue>> values,
java.util.Locale currentLocale)
code - the codevalues - the valuescurrentLocale - the current localepublic java.util.Map<java.util.Locale,java.util.List<FeatureValue>> getValuesForAllLocales()
Locale and value list of feature values.public java.util.List<FeatureValue> getValues(java.util.Locale locale)
locale - the localepublic java.util.List<FeatureValue> getValues()
Featurepublic FeatureValue getValue()
Featurepublic FeatureValue getValue(java.util.Locale locale)
public void addValue(FeatureValue fvalue)
FeatureFeatureValuepublic void addValue(FeatureValue fvalue, java.util.Locale locale)
public void addValue(int index,
FeatureValue fvalue)
FeatureFeatureValueat the specified index position in this list (optional operation). Shifts the
element currently at that position (if any) and any subsequent elements to the right (adds one to their indices).public void addValue(int index,
FeatureValue fvalue,
java.util.Locale locale)
public boolean removeValue(FeatureValue fvalue)
FeatureFeatureValue from the feature, if it is present (optional
operation). If this UnlocalizedFeature does not contain this FeatureValue, it is unchanged. More
formally, removes the element with the lowest index i such that
(o==null ? get(i)==null : o.equals(get(i))) (if such an element exists). Returns
true if the feature contained the specified feature value.removeValue in class Featurefvalue - the FeatureValue to be removedpublic boolean removeValue(FeatureValue fvalue, java.util.Locale locale)
public void removeAllValues()
FeatureFeatureValues from the current feature.removeAllValues in class Featurepublic void removeAllValues(java.util.Locale locale)
public void setValues(java.util.List<FeatureValue> fvalues)
FeatureFeatureValue of this Feature and add the given List with FeatureValues to this Feature.
If the parameter is null the internal FeatureValue List will only be cleared (same behaviour as
Feature.removeAllValues()public void setValues(java.util.List<FeatureValue> fvalues, java.util.Locale locale)
Copyright © 2018 SAP SE. All Rights Reserved.