io.qt.core.QRandomGenerator Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of qtjambi Show documentation
Show all versions of qtjambi Show documentation
QtJambi base module containing QtCore, QtGui and QtWidgets.
package io.qt.core;
/**
* Allows one to obtain random values from a high-quality Random Number Generator
* Java wrapper for Qt class QRandomGenerator
*/
public class QRandomGenerator extends io.qt.QtObject
{
static {
QtJambi_LibraryUtilities.initialize();
}
/**
* Overloaded constructor for {@link #QRandomGenerator(int)}
* with seedValue = 1
.
*/
public QRandomGenerator() {
this((int)1);
}
/**
* See QRandomGenerator::QRandomGenerator(quint32)
*/
public QRandomGenerator(int seedValue){
super((QPrivateConstructor)null);
initialize_native(this, seedValue);
}
private native static void initialize_native(QRandomGenerator instance, int seedValue);
/**
* See QRandomGenerator::discard(qulonglong)
*/
@io.qt.QtUninvokable
public final void discard(long z){
discard_native_unsigned_long_long(QtJambi_LibraryUtilities.internal.nativeId(this), z);
}
@io.qt.QtUninvokable
private native void discard_native_unsigned_long_long(long __this__nativeId, long z);
/**
* See QRandomGenerator::generate()
*/
@io.qt.QtUninvokable
public final int generate(){
return generate_native(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@io.qt.QtUninvokable
private native int generate_native(long __this__nativeId);
/**
* See QRandomGenerator::generate64()
*/
@io.qt.QtUninvokable
public final long generate64(){
return generate64_native(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@io.qt.QtUninvokable
private native long generate64_native(long __this__nativeId);
/**
* See QRandomGenerator::generateDouble()
*/
@io.qt.QtUninvokable
public final double generateDouble(){
return generateDouble_native(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@io.qt.QtUninvokable
private native double generateDouble_native(long __this__nativeId);
@io.qt.QtUninvokable
private final boolean operator_not_equal(io.qt.core.QRandomGenerator rng2){
java.util.Objects.requireNonNull(rng2, "Argument 'rng2': null not expected.");
return operator_not_equal_native_cref_QRandomGenerator(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(rng2));
}
@io.qt.QtUninvokable
private native boolean operator_not_equal_native_cref_QRandomGenerator(long __this__nativeId, long rng2);
/**
* Overloaded function for {@link #seed(int)}
* with s = 1
.
*/
@io.qt.QtUninvokable
public final void seed() {
seed((int)1);
}
/**
* See QRandomGenerator::seed(quint32)
*/
@io.qt.QtUninvokable
public final void seed(int s){
seed_native_unsigned_int(QtJambi_LibraryUtilities.internal.nativeId(this), s);
}
@io.qt.QtUninvokable
private native void seed_native_unsigned_int(long __this__nativeId, int s);
/**
* See QRandomGenerator::global()
*/
public native static io.qt.core.QRandomGenerator global();
/**
*
*/
public native static int max();
/**
*
*/
public native static int min();
/**
* See QRandomGenerator::securelySeeded()
*/
public native static io.qt.core.QRandomGenerator securelySeeded();
/**
* See QRandomGenerator::system()
*/
public native static io.qt.core.QRandomGenerator system();
/**
* Constructor for internal use only.
* @param p expected to be null
.
*/
@io.qt.NativeAccess
protected QRandomGenerator(QPrivateConstructor p) { super(p); }
@Override
@io.qt.QtUninvokable
public boolean equals(Object other) {
if (other instanceof io.qt.core.QRandomGenerator) {
return !operator_not_equal((io.qt.core.QRandomGenerator) other);
}
return false;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy