net.jqwik.api.arbitraries.CharacterArbitrary Maven / Gradle / Ivy
package net.jqwik.api.arbitraries;
import org.apiguardian.api.*;
import net.jqwik.api.*;
import static org.apiguardian.api.API.Status.*;
/**
* Fluent interface to configure the generation of Character and char values.
*/
@API(status = MAINTAINED, since = "1.0")
public interface CharacterArbitrary extends Arbitrary {
/**
* Allow all unicode chars to show up in generated values.
*
*
* Resets previous settings.
*
*
* @return new instance of arbitrary
*/
CharacterArbitrary all();
/**
* Allow all chars in {@code allowedChars} show up in generated values.
*
*
* Adds to all already allowed chars.
*
*
* @param allowedChars chars allowed
* @return new instance of arbitrary
*/
@API(status = MAINTAINED, since = "1.1.3")
CharacterArbitrary with(char... allowedChars);
/**
* Allow all chars in {@code allowedChars} show up in generated values.
*
*
* Adds to all already allowed chars.
*
*
* @param allowedChars as String or other CharSequence
* @return new instance of arbitrary
*/
@API(status = MAINTAINED, since = "1.2.1")
CharacterArbitrary with(CharSequence allowedChars);
/**
* Allow all chars within {@code min} (included) and {@code max} (included) to show up in generated values.
*
*
* Adds to all already allowed chars.
*
*
* @param min min char value
* @param max max char value
* @return new instance of arbitrary
*/
@API(status = MAINTAINED, since = "1.1.3")
CharacterArbitrary range(char min, char max);
/**
* Allow all ascii chars to show up in generated values.
*
*
* Adds to all already allowed chars.
*
*
* @return new instance of arbitrary
*/
CharacterArbitrary ascii();
/**
* Allow all numeric chars (digits) to show up in generated values.
*
*
* Adds to all already allowed chars.
*
*
* @return new instance of arbitrary
*/
CharacterArbitrary digit();
/**
* Allow all whitespace chars to show up in generated values.
*
*
* Adds to all already allowed chars.
*
*
* @return new instance of arbitrary
*/
@API(status = MAINTAINED, since = "1.1.3")
CharacterArbitrary whitespace();
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy