Class Word.Builder

  • All Implemented Interfaces:
    WordOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
    Enclosing class:
    Word

    public static final class Word.Builder
    extends com.google.protobuf.GeneratedMessageV3.Builder<Word.Builder>
    implements WordOrBuilder
     A word representation.
     
    Protobuf type google.cloud.vision.v1p4beta1.Word
    • Method Detail

      • getDescriptor

        public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
      • internalGetFieldAccessorTable

        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
        Specified by:
        internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3.Builder<Word.Builder>
      • clear

        public Word.Builder clear()
        Specified by:
        clear in interface com.google.protobuf.Message.Builder
        Specified by:
        clear in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        clear in class com.google.protobuf.GeneratedMessageV3.Builder<Word.Builder>
      • getDescriptorForType

        public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
        Specified by:
        getDescriptorForType in interface com.google.protobuf.Message.Builder
        Specified by:
        getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
        Overrides:
        getDescriptorForType in class com.google.protobuf.GeneratedMessageV3.Builder<Word.Builder>
      • getDefaultInstanceForType

        public Word getDefaultInstanceForType()
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
      • build

        public Word build()
        Specified by:
        build in interface com.google.protobuf.Message.Builder
        Specified by:
        build in interface com.google.protobuf.MessageLite.Builder
      • buildPartial

        public Word buildPartial()
        Specified by:
        buildPartial in interface com.google.protobuf.Message.Builder
        Specified by:
        buildPartial in interface com.google.protobuf.MessageLite.Builder
      • clone

        public Word.Builder clone()
        Specified by:
        clone in interface com.google.protobuf.Message.Builder
        Specified by:
        clone in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        clone in class com.google.protobuf.GeneratedMessageV3.Builder<Word.Builder>
      • setField

        public Word.Builder setField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                     Object value)
        Specified by:
        setField in interface com.google.protobuf.Message.Builder
        Overrides:
        setField in class com.google.protobuf.GeneratedMessageV3.Builder<Word.Builder>
      • clearField

        public Word.Builder clearField​(com.google.protobuf.Descriptors.FieldDescriptor field)
        Specified by:
        clearField in interface com.google.protobuf.Message.Builder
        Overrides:
        clearField in class com.google.protobuf.GeneratedMessageV3.Builder<Word.Builder>
      • clearOneof

        public Word.Builder clearOneof​(com.google.protobuf.Descriptors.OneofDescriptor oneof)
        Specified by:
        clearOneof in interface com.google.protobuf.Message.Builder
        Overrides:
        clearOneof in class com.google.protobuf.GeneratedMessageV3.Builder<Word.Builder>
      • setRepeatedField

        public Word.Builder setRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                             int index,
                                             Object value)
        Specified by:
        setRepeatedField in interface com.google.protobuf.Message.Builder
        Overrides:
        setRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<Word.Builder>
      • addRepeatedField

        public Word.Builder addRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                             Object value)
        Specified by:
        addRepeatedField in interface com.google.protobuf.Message.Builder
        Overrides:
        addRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<Word.Builder>
      • mergeFrom

        public Word.Builder mergeFrom​(com.google.protobuf.Message other)
        Specified by:
        mergeFrom in interface com.google.protobuf.Message.Builder
        Overrides:
        mergeFrom in class com.google.protobuf.AbstractMessage.Builder<Word.Builder>
      • isInitialized

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.google.protobuf.GeneratedMessageV3.Builder<Word.Builder>
      • mergeFrom

        public Word.Builder mergeFrom​(com.google.protobuf.CodedInputStream input,
                                      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                               throws IOException
        Specified by:
        mergeFrom in interface com.google.protobuf.Message.Builder
        Specified by:
        mergeFrom in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        mergeFrom in class com.google.protobuf.AbstractMessage.Builder<Word.Builder>
        Throws:
        IOException
      • hasProperty

        public boolean hasProperty()
         Additional information detected for the word.
         
        .google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty property = 1;
        Specified by:
        hasProperty in interface WordOrBuilder
        Returns:
        Whether the property field is set.
      • getProperty

        public TextAnnotation.TextProperty getProperty()
         Additional information detected for the word.
         
        .google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty property = 1;
        Specified by:
        getProperty in interface WordOrBuilder
        Returns:
        The property.
      • setProperty

        public Word.Builder setProperty​(TextAnnotation.TextProperty value)
         Additional information detected for the word.
         
        .google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty property = 1;
      • mergeProperty

        public Word.Builder mergeProperty​(TextAnnotation.TextProperty value)
         Additional information detected for the word.
         
        .google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty property = 1;
      • clearProperty

        public Word.Builder clearProperty()
         Additional information detected for the word.
         
        .google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty property = 1;
      • getPropertyBuilder

        public TextAnnotation.TextProperty.Builder getPropertyBuilder()
         Additional information detected for the word.
         
        .google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty property = 1;
      • hasBoundingBox

        public boolean hasBoundingBox()
         The bounding box for the word.
         The vertices are in the order of top-left, top-right, bottom-right,
         bottom-left. When a rotation of the bounding box is detected the rotation
         is represented as around the top-left corner as defined when the text is
         read in the 'natural' orientation.
         For example:
           * when the text is horizontal it might look like:
              0----1
              |    |
              3----2
           * when it's rotated 180 degrees around the top-left corner it becomes:
              2----3
              |    |
              1----0
           and the vertex order will still be (0, 1, 2, 3).
         
        .google.cloud.vision.v1p4beta1.BoundingPoly bounding_box = 2;
        Specified by:
        hasBoundingBox in interface WordOrBuilder
        Returns:
        Whether the boundingBox field is set.
      • getBoundingBox

        public BoundingPoly getBoundingBox()
         The bounding box for the word.
         The vertices are in the order of top-left, top-right, bottom-right,
         bottom-left. When a rotation of the bounding box is detected the rotation
         is represented as around the top-left corner as defined when the text is
         read in the 'natural' orientation.
         For example:
           * when the text is horizontal it might look like:
              0----1
              |    |
              3----2
           * when it's rotated 180 degrees around the top-left corner it becomes:
              2----3
              |    |
              1----0
           and the vertex order will still be (0, 1, 2, 3).
         
        .google.cloud.vision.v1p4beta1.BoundingPoly bounding_box = 2;
        Specified by:
        getBoundingBox in interface WordOrBuilder
        Returns:
        The boundingBox.
      • setBoundingBox

        public Word.Builder setBoundingBox​(BoundingPoly value)
         The bounding box for the word.
         The vertices are in the order of top-left, top-right, bottom-right,
         bottom-left. When a rotation of the bounding box is detected the rotation
         is represented as around the top-left corner as defined when the text is
         read in the 'natural' orientation.
         For example:
           * when the text is horizontal it might look like:
              0----1
              |    |
              3----2
           * when it's rotated 180 degrees around the top-left corner it becomes:
              2----3
              |    |
              1----0
           and the vertex order will still be (0, 1, 2, 3).
         
        .google.cloud.vision.v1p4beta1.BoundingPoly bounding_box = 2;
      • setBoundingBox

        public Word.Builder setBoundingBox​(BoundingPoly.Builder builderForValue)
         The bounding box for the word.
         The vertices are in the order of top-left, top-right, bottom-right,
         bottom-left. When a rotation of the bounding box is detected the rotation
         is represented as around the top-left corner as defined when the text is
         read in the 'natural' orientation.
         For example:
           * when the text is horizontal it might look like:
              0----1
              |    |
              3----2
           * when it's rotated 180 degrees around the top-left corner it becomes:
              2----3
              |    |
              1----0
           and the vertex order will still be (0, 1, 2, 3).
         
        .google.cloud.vision.v1p4beta1.BoundingPoly bounding_box = 2;
      • mergeBoundingBox

        public Word.Builder mergeBoundingBox​(BoundingPoly value)
         The bounding box for the word.
         The vertices are in the order of top-left, top-right, bottom-right,
         bottom-left. When a rotation of the bounding box is detected the rotation
         is represented as around the top-left corner as defined when the text is
         read in the 'natural' orientation.
         For example:
           * when the text is horizontal it might look like:
              0----1
              |    |
              3----2
           * when it's rotated 180 degrees around the top-left corner it becomes:
              2----3
              |    |
              1----0
           and the vertex order will still be (0, 1, 2, 3).
         
        .google.cloud.vision.v1p4beta1.BoundingPoly bounding_box = 2;
      • clearBoundingBox

        public Word.Builder clearBoundingBox()
         The bounding box for the word.
         The vertices are in the order of top-left, top-right, bottom-right,
         bottom-left. When a rotation of the bounding box is detected the rotation
         is represented as around the top-left corner as defined when the text is
         read in the 'natural' orientation.
         For example:
           * when the text is horizontal it might look like:
              0----1
              |    |
              3----2
           * when it's rotated 180 degrees around the top-left corner it becomes:
              2----3
              |    |
              1----0
           and the vertex order will still be (0, 1, 2, 3).
         
        .google.cloud.vision.v1p4beta1.BoundingPoly bounding_box = 2;
      • getBoundingBoxBuilder

        public BoundingPoly.Builder getBoundingBoxBuilder()
         The bounding box for the word.
         The vertices are in the order of top-left, top-right, bottom-right,
         bottom-left. When a rotation of the bounding box is detected the rotation
         is represented as around the top-left corner as defined when the text is
         read in the 'natural' orientation.
         For example:
           * when the text is horizontal it might look like:
              0----1
              |    |
              3----2
           * when it's rotated 180 degrees around the top-left corner it becomes:
              2----3
              |    |
              1----0
           and the vertex order will still be (0, 1, 2, 3).
         
        .google.cloud.vision.v1p4beta1.BoundingPoly bounding_box = 2;
      • getBoundingBoxOrBuilder

        public BoundingPolyOrBuilder getBoundingBoxOrBuilder()
         The bounding box for the word.
         The vertices are in the order of top-left, top-right, bottom-right,
         bottom-left. When a rotation of the bounding box is detected the rotation
         is represented as around the top-left corner as defined when the text is
         read in the 'natural' orientation.
         For example:
           * when the text is horizontal it might look like:
              0----1
              |    |
              3----2
           * when it's rotated 180 degrees around the top-left corner it becomes:
              2----3
              |    |
              1----0
           and the vertex order will still be (0, 1, 2, 3).
         
        .google.cloud.vision.v1p4beta1.BoundingPoly bounding_box = 2;
        Specified by:
        getBoundingBoxOrBuilder in interface WordOrBuilder
      • getSymbolsList

        public List<Symbol> getSymbolsList()
         List of symbols in the word.
         The order of the symbols follows the natural reading order.
         
        repeated .google.cloud.vision.v1p4beta1.Symbol symbols = 3;
        Specified by:
        getSymbolsList in interface WordOrBuilder
      • getSymbolsCount

        public int getSymbolsCount()
         List of symbols in the word.
         The order of the symbols follows the natural reading order.
         
        repeated .google.cloud.vision.v1p4beta1.Symbol symbols = 3;
        Specified by:
        getSymbolsCount in interface WordOrBuilder
      • getSymbols

        public Symbol getSymbols​(int index)
         List of symbols in the word.
         The order of the symbols follows the natural reading order.
         
        repeated .google.cloud.vision.v1p4beta1.Symbol symbols = 3;
        Specified by:
        getSymbols in interface WordOrBuilder
      • setSymbols

        public Word.Builder setSymbols​(int index,
                                       Symbol value)
         List of symbols in the word.
         The order of the symbols follows the natural reading order.
         
        repeated .google.cloud.vision.v1p4beta1.Symbol symbols = 3;
      • setSymbols

        public Word.Builder setSymbols​(int index,
                                       Symbol.Builder builderForValue)
         List of symbols in the word.
         The order of the symbols follows the natural reading order.
         
        repeated .google.cloud.vision.v1p4beta1.Symbol symbols = 3;
      • addSymbols

        public Word.Builder addSymbols​(Symbol value)
         List of symbols in the word.
         The order of the symbols follows the natural reading order.
         
        repeated .google.cloud.vision.v1p4beta1.Symbol symbols = 3;
      • addSymbols

        public Word.Builder addSymbols​(int index,
                                       Symbol value)
         List of symbols in the word.
         The order of the symbols follows the natural reading order.
         
        repeated .google.cloud.vision.v1p4beta1.Symbol symbols = 3;
      • addSymbols

        public Word.Builder addSymbols​(Symbol.Builder builderForValue)
         List of symbols in the word.
         The order of the symbols follows the natural reading order.
         
        repeated .google.cloud.vision.v1p4beta1.Symbol symbols = 3;
      • addSymbols

        public Word.Builder addSymbols​(int index,
                                       Symbol.Builder builderForValue)
         List of symbols in the word.
         The order of the symbols follows the natural reading order.
         
        repeated .google.cloud.vision.v1p4beta1.Symbol symbols = 3;
      • addAllSymbols

        public Word.Builder addAllSymbols​(Iterable<? extends Symbol> values)
         List of symbols in the word.
         The order of the symbols follows the natural reading order.
         
        repeated .google.cloud.vision.v1p4beta1.Symbol symbols = 3;
      • clearSymbols

        public Word.Builder clearSymbols()
         List of symbols in the word.
         The order of the symbols follows the natural reading order.
         
        repeated .google.cloud.vision.v1p4beta1.Symbol symbols = 3;
      • removeSymbols

        public Word.Builder removeSymbols​(int index)
         List of symbols in the word.
         The order of the symbols follows the natural reading order.
         
        repeated .google.cloud.vision.v1p4beta1.Symbol symbols = 3;
      • getSymbolsBuilder

        public Symbol.Builder getSymbolsBuilder​(int index)
         List of symbols in the word.
         The order of the symbols follows the natural reading order.
         
        repeated .google.cloud.vision.v1p4beta1.Symbol symbols = 3;
      • getSymbolsOrBuilder

        public SymbolOrBuilder getSymbolsOrBuilder​(int index)
         List of symbols in the word.
         The order of the symbols follows the natural reading order.
         
        repeated .google.cloud.vision.v1p4beta1.Symbol symbols = 3;
        Specified by:
        getSymbolsOrBuilder in interface WordOrBuilder
      • getSymbolsOrBuilderList

        public List<? extends SymbolOrBuilder> getSymbolsOrBuilderList()
         List of symbols in the word.
         The order of the symbols follows the natural reading order.
         
        repeated .google.cloud.vision.v1p4beta1.Symbol symbols = 3;
        Specified by:
        getSymbolsOrBuilderList in interface WordOrBuilder
      • addSymbolsBuilder

        public Symbol.Builder addSymbolsBuilder()
         List of symbols in the word.
         The order of the symbols follows the natural reading order.
         
        repeated .google.cloud.vision.v1p4beta1.Symbol symbols = 3;
      • addSymbolsBuilder

        public Symbol.Builder addSymbolsBuilder​(int index)
         List of symbols in the word.
         The order of the symbols follows the natural reading order.
         
        repeated .google.cloud.vision.v1p4beta1.Symbol symbols = 3;
      • getSymbolsBuilderList

        public List<Symbol.Builder> getSymbolsBuilderList()
         List of symbols in the word.
         The order of the symbols follows the natural reading order.
         
        repeated .google.cloud.vision.v1p4beta1.Symbol symbols = 3;
      • getConfidence

        public float getConfidence()
         Confidence of the OCR results for the word. Range [0, 1].
         
        float confidence = 4;
        Specified by:
        getConfidence in interface WordOrBuilder
        Returns:
        The confidence.
      • setConfidence

        public Word.Builder setConfidence​(float value)
         Confidence of the OCR results for the word. Range [0, 1].
         
        float confidence = 4;
        Parameters:
        value - The confidence to set.
        Returns:
        This builder for chaining.
      • clearConfidence

        public Word.Builder clearConfidence()
         Confidence of the OCR results for the word. Range [0, 1].
         
        float confidence = 4;
        Returns:
        This builder for chaining.
      • setUnknownFields

        public final Word.Builder setUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        setUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        setUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<Word.Builder>
      • mergeUnknownFields

        public final Word.Builder mergeUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        mergeUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        mergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<Word.Builder>