io.qt.core.QRandomGenerator Maven / Gradle / Ivy
Show all versions of qtjambi Show documentation
package io.qt.core;
import io.qt.*;
/**
* Allows one to obtain random values from a high-quality Random Number Generator
* Java wrapper for Qt class QRandomGenerator
*/
public class QRandomGenerator extends QtObject
implements java.lang.Cloneable
{
static {
QtJambi_LibraryUtilities.initialize();
}
/**
* See QRandomGenerator:: QRandomGenerator(QRandomGenerator)
*/
public QRandomGenerator(io.qt.core.@NonNull QRandomGenerator other){
super((QPrivateConstructor)null);
initialize_native(this, other);
}
private native static void initialize_native(QRandomGenerator instance, io.qt.core.QRandomGenerator other);
/**
* 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:: QRandomGenerator(std::initializer_list<uint>)
*/
public QRandomGenerator(int@NonNull ... sseq){
super((QPrivateConstructor)null);
initialize_native(this, sseq);
}
private native static void initialize_native(QRandomGenerator instance, int[] sseq);
/**
* See QRandomGenerator:: discard(qulonglong)
*/
@QtUninvokable
public final void discard(long z){
discard_native_unsigned_long_long(QtJambi_LibraryUtilities.internal.nativeId(this), z);
}
@QtUninvokable
private native void discard_native_unsigned_long_long(long __this__nativeId, long z);
/**
* See QRandomGenerator:: generate()
*/
@QtUninvokable
public final int generate(){
return generate_native(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native int generate_native(long __this__nativeId);
/**
* See QRandomGenerator:: generate(quint32*, quint32*)
*/
@QtUninvokable
public final void generate(int @StrictNonNull[] array){
java.util.Objects.requireNonNull(array, "Argument 'array': null not expected.");
generate_native_quint32_ptr_quint32_ptr(QtJambi_LibraryUtilities.internal.nativeId(this), array);
}
@QtUninvokable
private native void generate_native_quint32_ptr_quint32_ptr(long __this__nativeId, int[] array);
/**
* See QRandomGenerator:: generate64()
*/
@QtUninvokable
public final long generate64(){
return generate64_native(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native long generate64_native(long __this__nativeId);
/**
* See QRandomGenerator:: generateDouble()
*/
@QtUninvokable
public final double generateDouble(){
return generateDouble_native(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native double generateDouble_native(long __this__nativeId);
/**
* See QRandomGenerator:: operator()()
*/
@QtUninvokable
public final int invoke(){
return invoke_native(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native int invoke_native(long __this__nativeId);
/**
* See QRandomGenerator:: operator=(QRandomGenerator)
*/
@QtUninvokable
public final void assign(io.qt.core.@NonNull QRandomGenerator other){
assign_native_cref_QRandomGenerator(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(other));
}
@QtUninvokable
private native void assign_native_cref_QRandomGenerator(long __this__nativeId, long other);
/**
* See operator==(QRandomGenerator, QRandomGenerator)
*/
@QtUninvokable
public final boolean equals(io.qt.core.@NonNull QRandomGenerator rng2){
return equals_native_cref_QRandomGenerator(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(rng2));
}
@QtUninvokable
private native boolean equals_native_cref_QRandomGenerator(long __this__nativeId, long rng2);
/**
* See QRandomGenerator:: seed(quint32)
*/
@QtUninvokable
public final void seed(int s){
seed_native_quint32(QtJambi_LibraryUtilities.internal.nativeId(this), s);
}
@QtUninvokable
private native void seed_native_quint32(long __this__nativeId, int s);
/**
* See QRandomGenerator:: seed(std::initializer_list<uint>)
*/
@QtUninvokable
public final void seed(int@NonNull ... sseq){
seed_native_cref_std_initializer_list(QtJambi_LibraryUtilities.internal.nativeId(this), sseq);
}
@QtUninvokable
private native void seed_native_cref_std_initializer_list(long __this__nativeId, int[] sseq);
/**
* See QRandomGenerator:: global()
*/
public native static io.qt.core.@Nullable QRandomGenerator global();
/**
*
*/
public native static int max();
/**
*
*/
public native static int min();
/**
* See QRandomGenerator:: securelySeeded()
*/
public native static io.qt.core.@NonNull QRandomGenerator securelySeeded();
/**
* See QRandomGenerator:: system()
*/
public native static io.qt.core.@Nullable QRandomGenerator system();
/**
* Constructor for internal use only.
* @param p expected to be null
.
* @hidden
*/
@NativeAccess
protected QRandomGenerator(QPrivateConstructor p) { super(p); }
/**
* See operator==(QRandomGenerator, QRandomGenerator)
*/
@Override
@QtUninvokable
public boolean equals(Object other) {
if (other==null || other instanceof io.qt.core.QRandomGenerator) {
return equals((io.qt.core.QRandomGenerator) other);
}
return false;
}
/**
* Returns the objects's hash code computed by qHash(QRandomGenerator)
.
*/
@QtUninvokable
@Override
public int hashCode() {
return 0;
}
/**
* Creates and returns a copy of this object.
See QRandomGenerator:: QRandomGenerator(QRandomGenerator)
*/
@QtUninvokable
@Override
public QRandomGenerator clone() {
return clone_native(QtJambi_LibraryUtilities.internal.nativeId(this));
}
private static native QRandomGenerator clone_native(long __this_nativeId);
/**
* Overloaded constructor for {@link #QRandomGenerator(int)}
* with seedValue = 1
.
*/
public QRandomGenerator() {
this((int)1);
}
/**
* Overloaded function for {@link #assign(io.qt.core.QRandomGenerator)}.
*/
@QtUninvokable
public final void assign(int other) {
assign(new io.qt.core.QRandomGenerator(other));
}
/**
* Overloaded function for {@link #equals(io.qt.core.QRandomGenerator)}.
*/
@QtUninvokable
public final boolean equals(int rng2) {
return equals(new io.qt.core.QRandomGenerator(rng2));
}
/**
* Overloaded function for {@link #seed(int)}
* with s = 1
.
*/
@QtUninvokable
public final void seed() {
seed((int)1);
}
}