@Generated(value="com.amazonaws:aws-java-sdk-code-generator") public class TextWithHighlights extends Object implements Serializable, Cloneable, StructuredPojo
Provides text and information about where to highlight the text.
Constructor and Description |
---|
TextWithHighlights() |
Modifier and Type | Method and Description |
---|---|
TextWithHighlights |
clone() |
boolean |
equals(Object obj) |
List<Highlight> |
getHighlights()
The beginning and end of the text that should be highlighted.
|
String |
getText()
The text to display to the user.
|
int |
hashCode() |
void |
marshall(ProtocolMarshaller protocolMarshaller)
Marshalls this structured data using the given
ProtocolMarshaller . |
void |
setHighlights(Collection<Highlight> highlights)
The beginning and end of the text that should be highlighted.
|
void |
setText(String text)
The text to display to the user.
|
String |
toString()
Returns a string representation of this object.
|
TextWithHighlights |
withHighlights(Collection<Highlight> highlights)
The beginning and end of the text that should be highlighted.
|
TextWithHighlights |
withHighlights(Highlight... highlights)
The beginning and end of the text that should be highlighted.
|
TextWithHighlights |
withText(String text)
The text to display to the user.
|
public void setText(String text)
The text to display to the user.
text
- The text to display to the user.public String getText()
The text to display to the user.
public TextWithHighlights withText(String text)
The text to display to the user.
text
- The text to display to the user.public List<Highlight> getHighlights()
The beginning and end of the text that should be highlighted.
public void setHighlights(Collection<Highlight> highlights)
The beginning and end of the text that should be highlighted.
highlights
- The beginning and end of the text that should be highlighted.public TextWithHighlights withHighlights(Highlight... highlights)
The beginning and end of the text that should be highlighted.
NOTE: This method appends the values to the existing list (if any). Use
setHighlights(java.util.Collection)
or withHighlights(java.util.Collection)
if you want to
override the existing values.
highlights
- The beginning and end of the text that should be highlighted.public TextWithHighlights withHighlights(Collection<Highlight> highlights)
The beginning and end of the text that should be highlighted.
highlights
- The beginning and end of the text that should be highlighted.public String toString()
toString
in class Object
Object.toString()
public TextWithHighlights clone()
public void marshall(ProtocolMarshaller protocolMarshaller)
StructuredPojo
ProtocolMarshaller
.marshall
in interface StructuredPojo
protocolMarshaller
- Implementation of ProtocolMarshaller
used to marshall this object's data.