Interface TextUtil.CutStringCritera

  • Enclosing class:
    TextUtil

    public static interface TextUtil.CutStringCritera
    Define the cutting critera of the string.
    Since:
    4.0
    Version:
    17.0 2020-01-04 14:41:39
    Author:
    Stéphane GALLAND
    Maven Group Id:
    org.arakhne.afc.core
    Maven Artifact Id:
    text
    • Method Detail

      • isOverfull

        boolean isOverfull​(long lineLength,
                           String word)
        Replies if the given word is overfull the line.
        Parameters:
        lineLength - is the current length of the line.
        word - is the word to add.
        Returns:
        true if the word is overfulling the line, false otherwise.
      • getLengthFor

        long getLengthFor​(String str)
        Replies the length of the given string.
        Parameters:
        str - the string.
        Returns:
        the length of str.
      • getCutIndexFor

        int getCutIndexFor​(String str)
        Replies the character index at which the given string may be cut to fit the critera.
        Parameters:
        str - the string.
        Returns:
        the character index.
      • getCritera

        long getCritera()
        Replies the critera.
        Returns:
        the critera.