io.qt.core.QFutureInterface Maven / Gradle / Ivy
package io.qt.core;
/**
* Java wrapper for Qt class QFutureInterface
*/
public final class QFutureInterface extends io.qt.core.QFutureInterfaceBase
implements java.lang.Cloneable
{
/**
* Overloaded factory for {@link #createVoidFutureInterface(io.qt.core.QFutureInterfaceBase.State)}
* with initialState = io.qt.core.QFutureInterfaceBase.State.NoState
.
*/
public static QFutureInterface createVoidFutureInterface() {
return createVoidFutureInterface(State.NoState);
}
public static QFutureInterface createVoidFutureInterface(State initialState) {
return new QFutureInterface<>(true, initialState);
}
public static QFutureInterface createVoidFutureInterface(io.qt.core.QFutureInterfaceBase other) {
return new QFutureInterface<>(other);
}
public static QFutureInterface canceledResult()
{ return new QFutureInterface(false, State.resolve(State.Started.value() | State.Finished.value() | State.Canceled.value())); }
/**
* Overloaded constructor for {@link #QFutureInterface(io.qt.core.QFutureInterfaceBase.State)}
* with initialState = io.qt.core.QFutureInterfaceBase.State.NoState
.
*/
private QFutureInterface(boolean isVoid) {
this(isVoid, io.qt.core.QFutureInterfaceBase.State.NoState);
}
private QFutureInterface(boolean isVoid, io.qt.core.QFutureInterfaceBase.State initialState){
super((QPrivateConstructor)null);
initialize_native(this, initialState, isVoid);
}
/**
* Overloaded constructor for {@link #QFutureInterface(io.qt.core.QFutureInterfaceBase.State)}
* with initialState = io.qt.core.QFutureInterfaceBase.State.NoState
.
*/
public QFutureInterface() {
this(false, io.qt.core.QFutureInterfaceBase.State.NoState);
}
public QFutureInterface(io.qt.core.QFutureInterfaceBase.State initialState){
this(false, initialState);
}
private native static void initialize_native(QFutureInterface instance, io.qt.core.QFutureInterfaceBase.State initialState, boolean isVoid);
public QFutureInterface(io.qt.core.QFutureInterface other){
super((QPrivateConstructor)null);
initialize_native(this, java.util.Objects.requireNonNull(other));
}
private QFutureInterface(io.qt.core.QFutureInterfaceBase other){
super((QPrivateConstructor)null);
initialize_native(this, java.util.Objects.requireNonNull(other));
}
private native static void initialize_native(QFutureInterface instance, io.qt.core.QFutureInterfaceBase other);
@io.qt.QtUninvokable
public final io.qt.core.QFuture future(){
return new io.qt.core.QFuture(this);
}
@io.qt.QtUninvokable
public final boolean reportFinished(T result){
return reportFinished(QtJambi_LibraryUtilities.internal.nativeId(this), result);
}
@io.qt.QtUninvokable
private native boolean reportFinished(long __this__nativeId, T result);
/**
* Overloaded function for {@link #reportResult(T, int)}
* with index = -1
.
*/
@io.qt.QtUninvokable
public final boolean reportResult(T result) {
return reportResult(QtJambi_LibraryUtilities.internal.nativeId(this), result, (int)-1);
}
@io.qt.QtUninvokable
public final boolean reportResult(T result, int index){
return reportResult(QtJambi_LibraryUtilities.internal.nativeId(this), result, index);
}
@io.qt.QtUninvokable
static native boolean reportResult(long __this__nativeId, T result, int index);
/**
* Overloaded function for {@link #reportResults(java.util.Collection, int, int)}
* with count = -1
.
*/
@io.qt.QtUninvokable
public final boolean reportResults(java.util.Collection results, int beginIndex) {
return reportResults(results, beginIndex, (int)-1);
}
/**
* Overloaded function for {@link #reportResults(java.util.Collection, int, int)}
* with:
* beginIndex = -1
* count = -1
*
*/
@io.qt.QtUninvokable
public final boolean reportResults(java.util.Collection results) {
return reportResults(results, (int)-1, (int)-1);
}
@io.qt.QtUninvokable
public final boolean reportResults(java.util.Collection results, int beginIndex, int count){
return reportResults(QtJambi_LibraryUtilities.internal.nativeId(this), results, beginIndex, count);
}
@io.qt.QtUninvokable
private native boolean reportResults(long __this__nativeId, java.util.Collection results, int beginIndex, int count);
@io.qt.QtUninvokable
public final T result(int index){
return result(QtJambi_LibraryUtilities.internal.nativeId(this), index);
}
@io.qt.QtUninvokable
static native T result(long __this__nativeId, int index);
@io.qt.QtUninvokable
public final io.qt.core.QList results(){
return results(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@io.qt.QtUninvokable
static native io.qt.core.QList results(long __this__nativeId);
/**
* Constructor for internal use only.
* @param p expected to be null
.
*/
@io.qt.NativeAccess
private QFutureInterface(QPrivateConstructor p) { super(p); }
@Override
public QFutureInterface clone() {
return clone(QtJambi_LibraryUtilities.internal.nativeId(this));
}
private native QFutureInterface clone(long __this_nativeId);
}