|
VTT Java 2010 Version |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgov.nih.nlm.nls.vtt.Lib.StringStats
public class StringStats
This code is to calculate the stats for a String. It includes character count, word count, and line count.
History:
Constructor Summary | |
---|---|
StringStats()
The constructor of StringStats object. |
|
StringStats(int charNum,
int charNum2,
int wordNum,
int lineNum,
java.util.Vector<java.lang.Integer> linePos)
The constructor of StringStats object by specifying total number of characters, total number of characters with line feed, total number of words, total number of lines, and a vector of start position of each line |
Method Summary | |
---|---|
int |
GetCharNum()
Get the total number of characters without line feed |
int |
GetCharNum2()
Get the total number of characters with line feed |
static int |
GetLineEndPos(java.util.Vector<java.lang.Integer> linePos,
int lineNo)
Get the line end positions. |
int |
GetLineNum()
Get the total number of lines |
java.util.Vector<java.lang.Integer> |
GetLinePos()
Get the start position of each line |
static int |
GetLineStartPos(java.util.Vector<java.lang.Integer> linePos,
int lineNo)
Get the line start positions. |
static StringStats |
GetStringStats(java.lang.String inStr)
Get the difference stats of an input string in string presentation |
int |
GetWordNum()
Get the total number of words |
java.lang.String |
ToString()
The string representation of the string difference. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public StringStats()
public StringStats(int charNum, int charNum2, int wordNum, int lineNum, java.util.Vector<java.lang.Integer> linePos)
Method Detail |
---|
public int GetCharNum()
public int GetCharNum2()
public int GetWordNum()
public int GetLineNum()
public java.util.Vector<java.lang.Integer> GetLinePos()
public static StringStats GetStringStats(java.lang.String inStr)
inStr
- input string of difference
public static int GetLineStartPos(java.util.Vector<java.lang.Integer> linePos, int lineNo)
linePos
- the position of all lineslineNo
- the line no in interested
public static int GetLineEndPos(java.util.Vector<java.lang.Integer> linePos, int lineNo)
linePos
- the position of all lineslineNo
- the line no in interested
public java.lang.String ToString()
|
VTT Java 2010 Version |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |