|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.vgrs.xcode.cmdline.common.RandomDataCmdLine
public class RandomDataCmdLine
Randomly spit out test data in various encoding type.
Random| Field Summary | |
|---|---|
static int |
DEFAULT_LINES
|
static char[] |
DELIMITERS
|
static char |
FULLSTOP
|
static int |
MAX_DOMAIN_LEN
|
static int |
MAX_LABEL_LEN
|
static int |
MAX_LABELS
|
static int |
MIN_LABEL_LEN
|
static int |
MIN_LABELS
|
static double |
PERCENT_BMP
|
static java.util.Random |
RAND
|
static char[] |
SC
|
static char[] |
TC
|
| Constructor Summary | |
|---|---|
RandomDataCmdLine()
|
|
| Method Summary | |
|---|---|
static java.lang.String |
getRandomAceDomain(java.lang.String aPrefix)
Randomly generates test ACE domains |
static java.lang.String |
getRandomAceLabel(java.lang.String aPrefix)
Randomly generates test ACE label |
static char |
getRandomAscii()
Randomly generates test ASCII character. |
static char |
getRandomDelimiter()
|
static int |
getRandomInteger()
Returns a random integer by calling getRandomInteger(Integer.MAX_VALUE) |
static int |
getRandomInteger(int aMax)
|
static int |
getRandomInteger(int aMin,
int aMax)
|
static java.lang.String |
getRandomNativeDomain(java.lang.String aEncoding)
Randomly generates test domains in Native encoding type |
static java.lang.String |
getRandomNativeLabel(java.lang.String aEncoding)
|
static char |
getRandomNone()
Randomly generates lable with value equals to OxE000 + the next pseudorandom generated by Random object |
static int[] |
getRandomRangedDomain(int aStart,
int aEnd)
Randomly generates ranged test domains |
static int[] |
getRandomRangedLabel(int aStart,
int aEnd)
Randomly generates ranged test lables |
static char |
getRandomSC()
Randomly generates test Simplified Chinese character |
static char |
getRandomTC()
Randomly generates test Tradictional Chinese character |
static java.lang.String |
getRandomTCSCDomain()
Randomly generates TC/SC test domains |
static java.lang.String |
getRandomTCSCLabel()
Randomly generates TC/SC test lables |
static int[] |
getRandomUnicodeDomain()
Randomly generates test Unicode domains |
static int[] |
getRandomUnicodeLabel()
Randomly generates test Unicode labels |
static java.lang.String |
getRandomUtf16Domain()
Randomly generates test Utf16 domains |
static java.lang.String |
getRandomUtf16Label()
Randomly generates test Utf16 labels |
static void |
main(java.lang.String[] aArgs)
|
static void |
printRandomAceLines(java.lang.String aPrefix,
boolean aLabels,
int aLines)
Randomly generates ACE test data |
static void |
printRandomNativeLines(boolean aLabels,
int aLines,
java.lang.String aEncoding)
Randomly generates test data in Native encoding type |
static void |
printRandomRangedLines(boolean aLabels,
int aLines,
int aStart,
int aEnd)
Randomly generates ranged test data |
static void |
printRandomTCSCLines(boolean aLabels,
int aLines)
Randomly generates TC/SC test data |
static void |
printRandomUnicodeLines(boolean aLabels,
int aLines)
Randomly generates Unicode test data |
static void |
printRandomUtf16Lines(boolean labels,
int lines)
Randomly generates Utf16 test data |
static void |
usage()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.util.Random RAND
public static final int MIN_LABELS
public static final int MAX_LABELS
public static final int MIN_LABEL_LEN
public static final int MAX_LABEL_LEN
public static final int MAX_DOMAIN_LEN
public static final char[] DELIMITERS
public static final char FULLSTOP
public static final int DEFAULT_LINES
public static final double PERCENT_BMP
public static char[] TC
public static char[] SC
| Constructor Detail |
|---|
public RandomDataCmdLine()
| Method Detail |
|---|
public static int getRandomInteger(int aMin,
int aMax)
public static int getRandomInteger(int aMax)
public static int getRandomInteger()
public static char getRandomDelimiter()
public static void usage()
public static void main(java.lang.String[] aArgs)
public static void printRandomRangedLines(boolean aLabels,
int aLines,
int aStart,
int aEnd)
aLabels - if true, generate multiple labelsaLines - indicates number of test records to generate
public static int[] getRandomRangedDomain(int aStart,
int aEnd)
public static int[] getRandomRangedLabel(int aStart,
int aEnd)
public static void printRandomTCSCLines(boolean aLabels,
int aLines)
aLabels - if true, generate TCSC domain, otherwise, generate TCSC labels.aLines - indicates number of test domain/labels to be generatedpublic static java.lang.String getRandomTCSCDomain()
public static java.lang.String getRandomTCSCLabel()
public static char getRandomNone()
public static char getRandomTC()
public static char getRandomSC()
public static char getRandomAscii()
public static void printRandomNativeLines(boolean aLabels,
int aLines,
java.lang.String aEncoding)
aLabels - if true, generate test domain, otherwise, generate test labels.aLines - indicates number of test domain/labels to be generated
public static java.lang.String getRandomNativeDomain(java.lang.String aEncoding)
throws XcodeException
XcodeException
public static java.lang.String getRandomNativeLabel(java.lang.String aEncoding)
throws XcodeException
XcodeException
public static void printRandomUtf16Lines(boolean labels,
int lines)
labels - if true, generate Utf16 domain, otherwise, generate Utf16 labels.lines - indicates number of test domain/labels to be generatedpublic static java.lang.String getRandomUtf16Domain()
public static java.lang.String getRandomUtf16Label()
public static void printRandomUnicodeLines(boolean aLabels,
int aLines)
aLabels - if true, generate Unicode domain, otherwise, generate Unicode
labels.aLines - indicates number of test domain/labels to be generatedpublic static int[] getRandomUnicodeDomain()
public static int[] getRandomUnicodeLabel()
public static void printRandomAceLines(java.lang.String aPrefix,
boolean aLabels,
int aLines)
aPrefix - the prefix of the ACE test domain, i.e., bq-- for RACE, xn-- for
PunyCode.aLabels - if true, generate test domain, otherwise, generate test labels.aLines - indicates number of test domain/labels to be generatedpublic static java.lang.String getRandomAceDomain(java.lang.String aPrefix)
aPrefix - the prefix of the ACE test domain, i.e., bq-- for RACE, xn-- for
PunyCode.
public static java.lang.String getRandomAceLabel(java.lang.String aPrefix)
aPrefix - the prefix of the ACE test domain, i.e., bq-- for RACE, xn-- for
PunyCode.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||