Interface StringSplitter


  • @Role
    public interface StringSplitter
    Used to split strings before computing their changes and to re-create the strings after applying patches.
    Since:
    11.10.1, 12.0RC1
    Version:
    $Id: 40785d1c12efa7be7e28d15ec4bcd4cb7035ca0c $
    • Method Detail

      • split

        List<Object> split​(String text)
        Splits the given string into a list of objects, which can be characters, words, phrases, etc. depending on the implementation. A larger list of objects will lead to a more detailed difference report when comparing strings.
        Parameters:
        text - the string to split
        Returns:
        the list of objects on which to compute the changes when comparing strings
      • join

        String join​(List<Object> objects)
        The reverse operation of split(String). Recreates the string from a list of objects.
        Parameters:
        objects - a list of objects produced by split(String) or by patching such a list
        Returns:
        a string that produces the given list of objects when passed to split(String)