difflib
Class DiffRowGenerator.Builder

java.lang.Object
  extended by difflib.DiffRowGenerator.Builder
Enclosing class:
DiffRowGenerator

public static class DiffRowGenerator.Builder
extends Object

This class used for building the DiffRowGenerator.

Author:
dmitry

Constructor Summary
DiffRowGenerator.Builder()
           
 
Method Summary
 DiffRowGenerator build()
          Build the DiffRowGenerator.
 DiffRowGenerator.Builder columnWidth(int width)
          Set the column with of generated lines of original and revised texts.
 DiffRowGenerator.Builder ignoreBlankLines(boolean val)
          Ignore blank lines in generating diff rows or not.
 DiffRowGenerator.Builder ignoreWhiteSpaces(boolean val)
          Ignore white spaces in generating diff rows or not.
 DiffRowGenerator.Builder InlineNewCssClass(String cssClass)
          Set the css class used for displaying changes in the revised text.
 DiffRowGenerator.Builder InlineNewTag(String tag)
          Set the tag used for displaying changes in the revised text.
 DiffRowGenerator.Builder InlineOldCssClass(String cssClass)
          Set the css class used for displaying changes in the original text.
 DiffRowGenerator.Builder InlineOldTag(String tag)
          Set the tag used for displaying changes in the original text.
 DiffRowGenerator.Builder showInlineDiffs(boolean val)
          Show inline diffs in generating diff rows or not.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DiffRowGenerator.Builder

public DiffRowGenerator.Builder()
Method Detail

showInlineDiffs

public DiffRowGenerator.Builder showInlineDiffs(boolean val)
Show inline diffs in generating diff rows or not.

Parameters:
val - the value to set. Default: false.
Returns:
builder with configured showInlineDiff parameter

ignoreWhiteSpaces

public DiffRowGenerator.Builder ignoreWhiteSpaces(boolean val)
Ignore white spaces in generating diff rows or not.

Parameters:
val - the value to set. Default: true.
Returns:
builder with configured ignoreWhiteSpaces parameter

ignoreBlankLines

public DiffRowGenerator.Builder ignoreBlankLines(boolean val)
Ignore blank lines in generating diff rows or not.

Parameters:
val - the value to set. Default: true.
Returns:
builder with configured ignoreBlankLines parameter

InlineOldTag

public DiffRowGenerator.Builder InlineOldTag(String tag)
Set the tag used for displaying changes in the original text.

Parameters:
tag - the tag to set. Without angle brackets. Default: span.
Returns:
builder with configured ignoreBlankLines parameter

InlineNewTag

public DiffRowGenerator.Builder InlineNewTag(String tag)
Set the tag used for displaying changes in the revised text.

Parameters:
tag - the tag to set. Without angle brackets. Default: span.
Returns:
builder with configured ignoreBlankLines parameter

InlineOldCssClass

public DiffRowGenerator.Builder InlineOldCssClass(String cssClass)
Set the css class used for displaying changes in the original text.

Parameters:
cssClass - the tag to set. Without any quotes, just word. Default: editOldInline.
Returns:
builder with configured ignoreBlankLines parameter

InlineNewCssClass

public DiffRowGenerator.Builder InlineNewCssClass(String cssClass)
Set the css class used for displaying changes in the revised text.

Parameters:
cssClass - the tag to set. Without any quotes, just word. Default: editNewInline.
Returns:
builder with configured ignoreBlankLines parameter

columnWidth

public DiffRowGenerator.Builder columnWidth(int width)
Set the column with of generated lines of original and revised texts.

Parameters:
width - the width to set. Making it < 0 doesn't have any sense. Default 80.
Returns:
builder with configured ignoreBlankLines parameter

build

public DiffRowGenerator build()
Build the DiffRowGenerator. If some parameters is not set, the default values are used.

Returns:
the customized DiffRowGenerator


Copyright © 2009-2013. All Rights Reserved.