public class CMARichText extends CMARichNode
data
Constructor and Description |
---|
CMARichText(java.lang.CharSequence value,
java.util.List<CMARichMark> marks)
Create a value with the given marks.
|
CMARichText(java.lang.String value)
Create a text with the given marks.
|
Modifier and Type | Method and Description |
---|---|
CMARichText |
addMarks(CMARichMark... marks)
Adds the given marks to this texts marks.
|
java.util.List<CMARichMark> |
getMarks() |
java.lang.CharSequence |
getValue() |
CMARichText |
setMarks(java.util.List<CMARichMark> marks)
Updates the marks of this text.
|
CMARichText |
setValue(java.lang.CharSequence value)
Update the value of this text.
|
getNodeType
public CMARichText(@NonNull java.lang.CharSequence value, @NonNull java.util.List<CMARichMark> marks)
value
- the value to be displayed.marks
- the marks to be used if any.java.lang.NullPointerException
- if one of the arguments is null.public CMARichText(@NonNull java.lang.String value)
value
- the text to be displayed.java.lang.NullPointerException
- if value is null.@NonNull public java.lang.CharSequence getValue()
@NonNull public CMARichText setValue(@NonNull java.lang.CharSequence value)
value
- the new value of the text.@NonNull public java.util.List<CMARichMark> getMarks()
@NonNull public CMARichText addMarks(@NonNull CMARichMark... marks)
marks
- defines which marks to be added.java.lang.NullPointerException
- if marks is null.@NonNull public CMARichText setMarks(@NonNull java.util.List<CMARichMark> marks)
marks
- defines which marks to be used.java.lang.NullPointerException
- if marks is null.Copyright © 2019 Contentful, GmbH.. All Rights Reserved.