Examples of CodePoints


Examples of com.pholser.junit.quickcheck.generator.java.lang.strings.CodePoints

    public void configure(InCharset c) {
        charset = Charset.forName(c.value());
    }

    @Override public String generate(SourceOfRandomness random, GenerationStatus status) {
        CodePoints charsetPoints = CodePoints.forCharset(charset);

        int[] codePoints = new int[status.size()];
        for (int i = 0; i < codePoints.length; ++i)
            codePoints[i] = charsetPoints.at(random.nextInt(0, charsetPoints.size() - 1));

        return new String(codePoints, 0, codePoints.length);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.