Interface ILines


  • public interface ILines
    A collection of dialog lines, supporting creation, indexed access, and random retrieval.
    • Method Detail

      • createLine

        ILine createLine​(String text)
        Creates and adds a new line with the given text.
        Parameters:
        text - the line text.
        Returns:
        the created line.
      • getLine

        ILine getLine​(boolean isRandom)
        Returns a line, either randomly or sequentially.
        Parameters:
        isRandom - true to return a random line; false for sequential.
        Returns:
        the selected line, or null if empty.
      • getLine

        ILine getLine​(int lineIndex)
        Returns the line at the given index.
        Parameters:
        lineIndex - the line index.
        Returns:
        the line, or null if the index is invalid.
      • setLine

        void setLine​(int lineIndex,
                     ILine line)
        Sets the line at the given index.
        Parameters:
        lineIndex - the line index.
        line - the line to set.
      • removeLine

        void removeLine​(int lineIndex)
        Removes the line at the given index.
        Parameters:
        lineIndex - the line index.
      • clear

        void clear()
        Removes all lines.
      • isEmpty

        boolean isEmpty()
        Returns:
        true if there are no lines.
      • getKeys

        Integer[] getKeys()
        Returns:
        the indices of all stored lines.