com.groupdocs.viewer.results

Class Word



  • public class Word
    extends TextElement<String>

    Represents relatively positioned rectangle which contains single word.

    • Constructor Detail

      • Word

        public Word(String word,
            double x,
            double y,
            double width,
            double height,
            List<Character> characters)

        Initializes new instance of Word class.

        Parameters:
        word - The word.
        x - The X coordinate of the highest left point on the page layout where the rectangle that contains word begins.
        y - The Y coordinate of the highest left point on the page layout where the rectangle that contains word begins.
        width - The width of the rectangle which contains the word.
        height - The height of the rectangle which contains the word.
        characters - The characters contained by the word.
        Throws:
        IllegalArgumentException - Thrown when word is null or empty.
        IllegalArgumentException - Thrown when characters is null.
    • Method Detail

      • getCharacters

        public final List<Character> getCharacters()
        The characters contained by the word.
        Returns:
        The characters contained by the word.
      • toString

        public String toString()

        Returns a string that represents the current object.

        Overrides:
        toString in class TextElement<String>
        Returns:
        A string that represents the current object.