Constructor and Description |
---|
TextContent(String text)
Creates a new text content.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
static TextContent |
from(String text)
Creates a new text content.
|
int |
hashCode() |
String |
text()
Returns the text.
|
String |
toString() |
ContentType |
type()
Returns the type of content.
|
public TextContent(String text)
text
- the text.public String text()
public ContentType type()
Content
Can be used to cast the content to the correct type.
public static TextContent from(String text)
text
- the text.Copyright © 2024. All rights reserved.