VTT Java
2010 Version

gov.nih.nlm.nls.vtt.Lib
Class DiffStats

java.lang.Object
  extended by gov.nih.nlm.nls.vtt.Lib.DiffStats

public class DiffStats
extends java.lang.Object

This code is to calculate the stats for the difference.

History:

Version:
V-2010
Author:
NLM NLS Development Team, clu

Constructor Summary
DiffStats()
          The constructor of DiffStats by using default values.
DiffStats(int addNum, int changeNum, int deleteNum, int diffNum, int srcChangeNum, int lineNum, java.util.Vector<java.lang.Integer> srcChangeLines, java.util.Vector<java.lang.Integer> srcDeleteLines, java.util.Vector<java.lang.Integer> tarChangeLines, java.util.Vector<java.lang.Integer> tarAddLines)
          The constructor of DiffStats by specifying addition number, changing number, deletion number, difference number, source change number, line number, source change lines, source deletion lines, target change lines, target addition lines.
DiffStats(int addNum, int changeNum, int deleteNum, int diffNum, int srcChangeNum, java.util.Vector<java.lang.Integer> srcChangeLines, java.util.Vector<java.lang.Integer> srcDeleteLines, java.util.Vector<java.lang.Integer> tarChangeLines, java.util.Vector<java.lang.Integer> tarAddLines)
          The constructor of DiffStats by specifying addition number, changing number, deletion number, difference number, source change number, source change lines, source deletion lines, target change lines, target addition lines.
 
Method Summary
 int GetAddNum()
          Get the addition number
 int GetChangeNum()
          Get the addition number
 int GetDeleteNum()
          Get the deletion number
 int GetDiffNum()
          Get the difference number
static DiffStats GetDiffStats(java.lang.String diffStr)
          get the detail of source difference from diffStr.
 int GetLineNum()
          Get the line number
 java.util.Vector<java.lang.Integer> GetSrcChangeLines()
          Get the source change lines
 int GetSrcChangeNum()
          Get the source change number
 java.util.Vector<java.lang.Integer> GetSrcDeleteLines()
          Get the source delete lines
 java.util.Vector<java.lang.Integer> GetTarAddLines()
          Get the target addition lines
 java.util.Vector<java.lang.Integer> GetTarChangeLines()
          Get the target change lines
 void SetLineNum(int lineNum)
          Set the line number
 java.lang.String ToString()
          The string representation of difference stats with default name, "lines".
 java.lang.String ToString(java.lang.String name)
          The string representation of difference stats with specified name.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DiffStats

public DiffStats()
The constructor of DiffStats by using default values.


DiffStats

public DiffStats(int addNum,
                 int changeNum,
                 int deleteNum,
                 int diffNum,
                 int srcChangeNum,
                 java.util.Vector<java.lang.Integer> srcChangeLines,
                 java.util.Vector<java.lang.Integer> srcDeleteLines,
                 java.util.Vector<java.lang.Integer> tarChangeLines,
                 java.util.Vector<java.lang.Integer> tarAddLines)
The constructor of DiffStats by specifying addition number, changing number, deletion number, difference number, source change number, source change lines, source deletion lines, target change lines, target addition lines.


DiffStats

public DiffStats(int addNum,
                 int changeNum,
                 int deleteNum,
                 int diffNum,
                 int srcChangeNum,
                 int lineNum,
                 java.util.Vector<java.lang.Integer> srcChangeLines,
                 java.util.Vector<java.lang.Integer> srcDeleteLines,
                 java.util.Vector<java.lang.Integer> tarChangeLines,
                 java.util.Vector<java.lang.Integer> tarAddLines)
The constructor of DiffStats by specifying addition number, changing number, deletion number, difference number, source change number, line number, source change lines, source deletion lines, target change lines, target addition lines.

Method Detail

GetAddNum

public int GetAddNum()
Get the addition number

Returns:
addition number

GetChangeNum

public int GetChangeNum()
Get the addition number

Returns:
addition number

GetDeleteNum

public int GetDeleteNum()
Get the deletion number

Returns:
deletion number

GetDiffNum

public int GetDiffNum()
Get the difference number

Returns:
difference number

GetLineNum

public int GetLineNum()
Get the line number

Returns:
line number

SetLineNum

public void SetLineNum(int lineNum)
Set the line number

Parameters:
lineNum - line number

GetSrcChangeNum

public int GetSrcChangeNum()
Get the source change number

Returns:
source change number

GetSrcChangeLines

public java.util.Vector<java.lang.Integer> GetSrcChangeLines()
Get the source change lines

Returns:
a vector of source change lines

GetSrcDeleteLines

public java.util.Vector<java.lang.Integer> GetSrcDeleteLines()
Get the source delete lines

Returns:
a vector of source delete lines

GetTarChangeLines

public java.util.Vector<java.lang.Integer> GetTarChangeLines()
Get the target change lines

Returns:
a vector of target change lines

GetTarAddLines

public java.util.Vector<java.lang.Integer> GetTarAddLines()
Get the target addition lines

Returns:
a vector of target addition lines

GetDiffStats

public static DiffStats GetDiffStats(java.lang.String diffStr)
get the detail of source difference from diffStr.

Parameters:
diffStr - the difference in string presentation
Returns:
a DiffStats object of the difference string

ToString

public java.lang.String ToString()
The string representation of difference stats with default name, "lines".

Returns:
the string representation of difference stats

ToString

public java.lang.String ToString(java.lang.String name)
The string representation of difference stats with specified name.

Parameters:
name - the name show on the difference string
Returns:
the string representation of difference stats

VTT Java
2010 Version

Submit a bug or feature

Copyright © 2010 National Library of Medicine