public String generateDiff ( GenericObject from , GenericObject to ) { StringBuilder builder = new StringBuilder ( ) ; builder . append ( "<table class=\"nomargin diff\">" ) ; builder . append ( "<thead>" ) ; builder . append ( "<tr>" ) ; builder . append ( "<th/>" ) ; builder . append ( "<th class=\"texttitle\">From</th>" ) ; builder . append ( "<th/>" ) ; builder . append ( "<th class=\"texttitle\">To</th>" ) ; builder . append ( "</tr>" ) ; builder . append ( "</thead>" ) ; builder . append ( "<tbody>" ) ; writeDiff ( builder , from , to ) ; builder . append ( "</tbody>" ) ; builder . append ( "</table>" ) ; return builder . toString ( ) ; }
Generate the HTML difference between two GenericObjects .