public class CodepointSetGenerator extends StringGenerator
| Constructor and Description |
|---|
CodepointSetGenerator(char[] chars)
All characters must be from BMP (no parts of surrogate pairs allowed).
|
CodepointSetGenerator(java.lang.String s)
Parse the given
String and split into BMP and supplementary codepoints. |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
ofCodePointsLength(java.util.Random r,
int minCodePoints,
int maxCodePoints) |
java.lang.String |
ofCodeUnitsLength(java.util.Random r,
int minCodeUnits,
int maxCodeUnits) |
ofStringLengthpublic CodepointSetGenerator(char[] chars)
public CodepointSetGenerator(java.lang.String s)
String and split into BMP and supplementary codepoints.public java.lang.String ofCodeUnitsLength(java.util.Random r,
int minCodeUnits,
int maxCodeUnits)
ofCodeUnitsLength in class StringGeneratorminCodeUnits - Minimum number of code units (inclusive).maxCodeUnits - Maximum number of code units (inclusive).minCodeUnits (inclusive)
and maxCodeUnits (inclusive) length. Code units are essentially
an equivalent of char type, see String class for
explanation.public java.lang.String ofCodePointsLength(java.util.Random r,
int minCodePoints,
int maxCodePoints)
ofCodePointsLength in class StringGeneratorminCodePoints - Minimum number of code points (inclusive).maxCodePoints - Maximum number of code points (inclusive).minCodePoints (inclusive)
and maxCodePoints (inclusive) length. Code points are full unicodeGenerator
codepoints or an equivalent of int type, see String class for
explanation. The returned String.length() may exceed maxCodeUnits
because certain code points may be encoded as surrogate pairs.Copyright © 2011–2018 Carrot Search s.c.. All rights reserved.