public static final class TextSpan.Builder extends GeneratedMessage.Builder<TextSpan.Builder> implements TextSpanOrBuilderRepresents an output piece of text.
Protobuf type google.cloud.language.v1beta2.TextSpan
Inheritance
java.lang.Object > AbstractMessageLite.Builder<MessageType,BuilderType> > AbstractMessage.Builder<BuilderType> > GeneratedMessage.Builder > TextSpan.BuilderImplements
TextSpanOrBuilderStatic Methods
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()| Returns | |
|---|---|
| Type | Description |
Descriptor |
|
Methods
build()
public TextSpan build()| Returns | |
|---|---|
| Type | Description |
TextSpan |
|
buildPartial()
public TextSpan buildPartial()| Returns | |
|---|---|
| Type | Description |
TextSpan |
|
clear()
public TextSpan.Builder clear()| Returns | |
|---|---|
| Type | Description |
TextSpan.Builder |
|
clearBeginOffset()
public TextSpan.Builder clearBeginOffset()The API calculates the beginning offset of the content in the original document according to the EncodingType specified in the API request.
int32 begin_offset = 2;
| Returns | |
|---|---|
| Type | Description |
TextSpan.Builder |
This builder for chaining. |
clearContent()
public TextSpan.Builder clearContent()The content of the output text.
string content = 1;
| Returns | |
|---|---|
| Type | Description |
TextSpan.Builder |
This builder for chaining. |
getBeginOffset()
public int getBeginOffset()The API calculates the beginning offset of the content in the original document according to the EncodingType specified in the API request.
int32 begin_offset = 2;
| Returns | |
|---|---|
| Type | Description |
int |
The beginOffset. |
getContent()
public String getContent()The content of the output text.
string content = 1;
| Returns | |
|---|---|
| Type | Description |
String |
The content. |
getContentBytes()
public ByteString getContentBytes()The content of the output text.
string content = 1;
| Returns | |
|---|---|
| Type | Description |
ByteString |
The bytes for content. |
getDefaultInstanceForType()
public TextSpan getDefaultInstanceForType()| Returns | |
|---|---|
| Type | Description |
TextSpan |
|
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()| Returns | |
|---|---|
| Type | Description |
Descriptor |
|
internalGetFieldAccessorTable()
protected GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()| Returns | |
|---|---|
| Type | Description |
FieldAccessorTable |
|
isInitialized()
public final boolean isInitialized()| Returns | |
|---|---|
| Type | Description |
boolean |
|
mergeFrom(TextSpan other)
public TextSpan.Builder mergeFrom(TextSpan other)| Parameter | |
|---|---|
| Name | Description |
other |
TextSpan |
| Returns | |
|---|---|
| Type | Description |
TextSpan.Builder |
|
mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public TextSpan.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)| Parameters | |
|---|---|
| Name | Description |
input |
CodedInputStream |
extensionRegistry |
ExtensionRegistryLite |
| Returns | |
|---|---|
| Type | Description |
TextSpan.Builder |
|
| Exceptions | |
|---|---|
| Type | Description |
IOException |
|
mergeFrom(Message other)
public TextSpan.Builder mergeFrom(Message other)| Parameter | |
|---|---|
| Name | Description |
other |
Message |
| Returns | |
|---|---|
| Type | Description |
TextSpan.Builder |
|
setBeginOffset(int value)
public TextSpan.Builder setBeginOffset(int value)The API calculates the beginning offset of the content in the original document according to the EncodingType specified in the API request.
int32 begin_offset = 2;
| Parameter | |
|---|---|
| Name | Description |
value |
intThe beginOffset to set. |
| Returns | |
|---|---|
| Type | Description |
TextSpan.Builder |
This builder for chaining. |
setContent(String value)
public TextSpan.Builder setContent(String value)The content of the output text.
string content = 1;
| Parameter | |
|---|---|
| Name | Description |
value |
StringThe content to set. |
| Returns | |
|---|---|
| Type | Description |
TextSpan.Builder |
This builder for chaining. |
setContentBytes(ByteString value)
public TextSpan.Builder setContentBytes(ByteString value)The content of the output text.
string content = 1;
| Parameter | |
|---|---|
| Name | Description |
value |
ByteStringThe bytes for content to set. |
| Returns | |
|---|---|
| Type | Description |
TextSpan.Builder |
This builder for chaining. |