Package com.contentful.java.cma.model
Class CMAEntry.Localized
- java.lang.Object
-
- com.contentful.java.cma.model.CMAEntry.Localized
-
- Enclosing class:
- CMAEntry
public class CMAEntry.Localized extends java.lang.ObjectLocalize all fields with a given locale.Please use
CMAEntry.localize(String)to see how to create an instance.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T> TgetField(java.lang.String key)Get a localized field.<T> CMAEntry.LocalizedsetField(java.lang.String key, T value)Change the value of a localized field.java.lang.StringtoString()
-
-
-
Method Detail
-
getField
public <T> T getField(java.lang.String key)
Get a localized field.- Type Parameters:
T- the type of the value to be returned.- Parameters:
key- the key of the value to be returned.- Returns:
- a value based on the key given here and the locale set earlier.
-
setField
public <T> CMAEntry.Localized setField(java.lang.String key, T value)
Change the value of a localized field.- Type Parameters:
T- type of the field.- Parameters:
key- identifier of the field to be changed.value- value of the new field.- Returns:
- an instance of the calling
CMAEntry.Localizedinstance, for easy chaining.
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object- Returns:
- a human readable string, representing the object.
-
-