populate()
method, you can use the DefaultDiffEngine.getLeftDiffLines() and DefaultDiffEngine.getRightDiffLines() to get the differences for the left and right content.List<String> leftList = new ArrayList<>(); leftList.add("firstline"); leftList.add("secondline"); List<String> rightList = new ArrayList<>(); rightList.add("firstline"); DefaultDiffEngine diffEngine = new DefaultDiffEngine(leftList, rightList); DiffBase diffBase = diffEngine.populate(); assertTrue("Content is changed", diffBase.isChanged()); List<DiffEngine.DiffLine> leftDiff = diffEngine.getLeftDiffLines(); List<DiffEngine.DiffLine> rightDiff = diffEngine.getRightDiffLines();
Copyright 2016-2019 Herve Girod. All Rights Reserved. Documentation and source under the BSD licence