Class CMARichBlock
- java.lang.Object
-
- com.contentful.java.cma.model.rich.CMARichNode
-
- com.contentful.java.cma.model.rich.CMARichBlock
-
- Direct Known Subclasses:
CMARichDocument,CMARichHeading,CMARichHyperLink,CMARichListItem,CMARichOrderedList,CMARichParagraph,CMARichQuote,CMARichTable,CMARichTableCell,CMARichTableHeaderCell,CMARichTableRow,CMARichUnorderedList
public class CMARichBlock extends CMARichNode
A collection of several nodes.
-
-
Field Summary
-
Fields inherited from class com.contentful.java.cma.model.rich.CMARichNode
data
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedCMARichBlock(java.lang.String type)Create a new block of type type
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CMARichBlockaddContent(CMARichNode... content)adds content to the already existing content.java.util.List<CMARichNode>getContent()CMARichBlocksetContent(java.util.List<CMARichNode> content)Updates the old content by overwriting it with the new content.-
Methods inherited from class com.contentful.java.cma.model.rich.CMARichNode
getNodeType
-
-
-
-
Method Detail
-
setContent
@NonNull public CMARichBlock setContent(@NonNull java.util.List<CMARichNode> content)
Updates the old content by overwriting it with the new content.- Parameters:
content- the new content to be used.- Returns:
- this instance for chaining.
-
addContent
@NonNull public CMARichBlock addContent(@NonNull CMARichNode... content)
adds content to the already existing content.- Parameters:
content- elements to be added.- Returns:
- this instance for chaining.
-
getContent
@NonNull public java.util.List<CMARichNode> getContent()
- Returns:
- a changeable list of contents of this block.
-
-