Class Hyphenation


  • public class Hyphenation
    extends Object
    This class represents a hyphenated word.
    Author:
    Carlos Villegas
    • Constructor Detail

      • Hyphenation

        public Hyphenation​(String word,
                           int[] points)
        rawWord as made of alternating strings and Hyphen instances
    • Method Detail

      • length

        public int length()
        Returns:
        the number of hyphenation points in the word
      • getPreHyphenText

        public String getPreHyphenText​(int index)
        Returns:
        the pre-break text, not including the hyphen character
      • getPostHyphenText

        public String getPostHyphenText​(int index)
        Returns:
        the post-break text
      • getHyphenationPoints

        public int[] getHyphenationPoints()
        Returns:
        the hyphenation points