All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.qt.core.QVersionNumber Maven / Gradle / Ivy

There is a newer version: 6.8.1
Show newest version
package io.qt.core;

import io.qt.*;


/**
 * 

Contains a version number with an arbitrary number of segments

*

Java wrapper for Qt class QVersionNumber

*/ public class QVersionNumber extends QtObject implements java.lang.Comparable<@StrictNonNull Object>, java.lang.Cloneable { static { QtJambi_LibraryUtilities.initialize(); } /** *

See QVersionNumber::QVersionNumber()

*/ public QVersionNumber(){ super((QPrivateConstructor)null); initialize_native(this); } private native static void initialize_native(QVersionNumber instance); /** *

See QVersionNumber::QVersionNumber(QSpan<const int>)

* @since This function was introduced in Qt 6.8. * @param args */ public QVersionNumber(io.qt.core.@NonNull QConstSpan args){ super((QPrivateConstructor)null); initialize_native(this, args); } private native static void initialize_native(QVersionNumber instance, io.qt.core.QConstSpan args); /** *

See QVersionNumber::QVersionNumber(QVersionNumber)

* @param other */ public QVersionNumber(io.qt.core.@NonNull QVersionNumber other){ super((QPrivateConstructor)null); initialize_native(this, other); } private native static void initialize_native(QVersionNumber instance, io.qt.core.QVersionNumber other); /** *

See QVersionNumber::QVersionNumber(int)

* @param maj */ public QVersionNumber(int maj){ super((QPrivateConstructor)null); initialize_native(this, maj); } private native static void initialize_native(QVersionNumber instance, int maj); /** *

See QVersionNumber::QVersionNumber(int,int)

* @param maj * @param min */ public QVersionNumber(int maj, int min){ super((QPrivateConstructor)null); initialize_native(this, maj, min); } private native static void initialize_native(QVersionNumber instance, int maj, int min); /** *

See QVersionNumber::QVersionNumber(int,int,int)

* @param maj * @param min * @param mic */ public QVersionNumber(int maj, int min, int mic){ super((QPrivateConstructor)null); initialize_native(this, maj, min, mic); } private native static void initialize_native(QVersionNumber instance, int maj, int min, int mic); /** *

See QVersionNumber::isNormalized()const

* @return */ @QtUninvokable public final boolean isNormalized(){ return isNormalized_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)); } @QtUninvokable private native boolean isNormalized_native_constfct(long __this__nativeId); /** *

See QVersionNumber::isNull()const

* @return */ @QtUninvokable public final boolean isNull(){ return isNull_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)); } @QtUninvokable private native boolean isNull_native_constfct(long __this__nativeId); /** *

See QVersionNumber::isPrefixOf(QVersionNumber)const

* @param other * @return */ @QtUninvokable public final boolean isPrefixOf(io.qt.core.@NonNull QVersionNumber other){ return isPrefixOf_native_cref_QVersionNumber_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(other)); } @QtUninvokable private native boolean isPrefixOf_native_cref_QVersionNumber_constfct(long __this__nativeId, long other); /** *

See QVersionNumber::majorVersion()const

* @return */ @QtUninvokable public final int majorVersion(){ return majorVersion_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)); } @QtUninvokable private native int majorVersion_native_constfct(long __this__nativeId); /** *

See QVersionNumber::microVersion()const

* @return */ @QtUninvokable public final int microVersion(){ return microVersion_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)); } @QtUninvokable private native int microVersion_native_constfct(long __this__nativeId); /** *

See QVersionNumber::minorVersion()const

* @return */ @QtUninvokable public final int minorVersion(){ return minorVersion_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)); } @QtUninvokable private native int minorVersion_native_constfct(long __this__nativeId); /** *

See QVersionNumber::normalized()const

* @return */ @QtUninvokable public final io.qt.core.@NonNull QVersionNumber normalized(){ return normalized_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)); } @QtUninvokable private native io.qt.core.QVersionNumber normalized_native_constfct(long __this__nativeId); @QtUninvokable private final boolean operator_less(io.qt.core.@NonNull QVersionNumber rhs){ return operator_less_native_cref_QVersionNumber(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(rhs)); } @QtUninvokable private native boolean operator_less_native_cref_QVersionNumber(long __this__nativeId, long rhs); /** *

See operator<<(QDataStream&,QVersionNumber)

* @param out */ @QtUninvokable public void writeTo(io.qt.core.@StrictNonNull QDataStream out){ java.util.Objects.requireNonNull(out, "Argument 'out': null not expected."); writeTo_native_ref_QDataStream(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(out)); } @QtUninvokable private native void writeTo_native_ref_QDataStream(long __this__nativeId, long out); /** *

See operator==(QVersionNumber,QVersionNumber)

* @param rhs * @return */ @QtUninvokable public final boolean equals(io.qt.core.@NonNull QVersionNumber rhs){ return equals_native_cref_QVersionNumber(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(rhs)); } @QtUninvokable private native boolean equals_native_cref_QVersionNumber(long __this__nativeId, long rhs); /** *

See operator>>(QDataStream&,QVersionNumber&)

* @param in */ @QtUninvokable public void readFrom(io.qt.core.@StrictNonNull QDataStream in){ java.util.Objects.requireNonNull(in, "Argument 'in': null not expected."); readFrom_native_ref_QDataStream(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(in)); } @QtUninvokable private native void readFrom_native_ref_QDataStream(long __this__nativeId, long in); /** *

See QVersionNumber::segmentAt(qsizetype)const

* @param index * @return */ @QtUninvokable public final int segmentAt(long index){ return segmentAt_native_qsizetype_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), index); } @QtUninvokable private native int segmentAt_native_qsizetype_constfct(long __this__nativeId, long index); /** *

See QVersionNumber::segmentCount()const

* @return */ @QtUninvokable public final long segmentCount(){ return segmentCount_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)); } @QtUninvokable private native long segmentCount_native_constfct(long __this__nativeId); /** *

See QVersionNumber::segments()const

* @return */ @QtUninvokable public final io.qt.core.@NonNull QList segments(){ return segments_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)); } @QtUninvokable private native io.qt.core.QList segments_native_constfct(long __this__nativeId); /** *

See QVersionNumber::toString()const

* @return */ @QtUninvokable public final java.lang.@NonNull String toString(){ return toString_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)); } @QtUninvokable private native java.lang.String toString_native_constfct(long __this__nativeId); /** *

See QVersionNumber::commonPrefix(QVersionNumber,QVersionNumber)

* @param v1 * @param v2 * @return */ public static io.qt.core.@NonNull QVersionNumber commonPrefix(io.qt.core.@NonNull QVersionNumber v1, io.qt.core.@NonNull QVersionNumber v2){ return commonPrefix_native_cref_QVersionNumber_cref_QVersionNumber(QtJambi_LibraryUtilities.internal.checkedNativeId(v1), QtJambi_LibraryUtilities.internal.checkedNativeId(v2)); } private native static io.qt.core.QVersionNumber commonPrefix_native_cref_QVersionNumber_cref_QVersionNumber(long v1, long v2); /** *

See QVersionNumber::compare(QVersionNumber,QVersionNumber)

* @param v1 * @param v2 * @return */ public static int compare(io.qt.core.@NonNull QVersionNumber v1, io.qt.core.@NonNull QVersionNumber v2){ return compare_native_cref_QVersionNumber_cref_QVersionNumber(QtJambi_LibraryUtilities.internal.checkedNativeId(v1), QtJambi_LibraryUtilities.internal.checkedNativeId(v2)); } private native static int compare_native_cref_QVersionNumber_cref_QVersionNumber(long v1, long v2); /** *

See QVersionNumber::fromString(QAnyStringView,qsizetype*)

* @since This function was introduced in Qt 6.4. * @param string * @param suffixIndex * @return */ public native static io.qt.core.@NonNull QVersionNumber fromString(java.lang.@NonNull String string, int @Nullable[] suffixIndex); /** * Constructor for internal use only. * @param p expected to be null. * @hidden */ @NativeAccess protected QVersionNumber(QPrivateConstructor p) { super(p); } /** *

Checks for equality depending on the type of given object.

*/ @Override @QtUninvokable public boolean equals(Object other) { if (other==null || other instanceof io.qt.core.QVersionNumber) { return equals((io.qt.core.QVersionNumber) other); } else if (other instanceof int[]) { return equals((int[]) other); } return false; } /** *

Compares to other object depending on its type.

*/ @QtUninvokable public int compareTo(@StrictNonNull Object other) { if (equals(other)) return 0; else if (other==null || other instanceof io.qt.core.QVersionNumber) { if (operator_less((io.qt.core.QVersionNumber) other)) return -1; else return 1; } else if (other instanceof int[]) { if (operator_less((int[]) other)) return -1; else return 1; } else throw new ClassCastException(); } /** * Returns the objects's hash code computed by qHash(QVersionNumber). */ @QtUninvokable @Override public int hashCode() { return hashCode_native(QtJambi_LibraryUtilities.internal.nativeId(this)); } @QtUninvokable private native static int hashCode_native(long __this_nativeId); /** *

Creates and returns a copy of this object.

See QVersionNumber::QVersionNumber(QVersionNumber)

*/ @QtUninvokable @Override public QVersionNumber clone() { return clone_native(QtJambi_LibraryUtilities.internal.nativeId(this)); } private static native QVersionNumber clone_native(long __this_nativeId); /** *

Overloaded constructor for {@link #QVersionNumber(io.qt.core.QConstSpan)}.

*/ public QVersionNumber(java.nio.@NonNull IntBuffer args) { this(io.qt.core.QConstSpan.ofBuffer(args)); } /** *

Overloaded constructor for {@link #QVersionNumber(io.qt.core.QConstSpan)}.

*/ public QVersionNumber(java.util.@NonNull Collection args) { this(io.qt.core.QConstSpan.ofList(args)); } /** *

Overloaded constructor for {@link #QVersionNumber(io.qt.core.QConstSpan)}.

*/ public QVersionNumber(io.qt.core.@NonNull QList args) { this(io.qt.core.QConstSpan.ofList(args)); } /** *

Overloaded constructor for {@link #QVersionNumber(io.qt.core.QConstSpan)}.

*/ public QVersionNumber(int @NonNull... args) { this(io.qt.core.QConstSpan.ofInt(args)); } /** *

Overloaded function for {@link #isPrefixOf(io.qt.core.QVersionNumber)}.

*/ @QtUninvokable public final boolean isPrefixOf(int@NonNull [] other) { return isPrefixOf(new io.qt.core.QVersionNumber(other)); } @QtUninvokable private final boolean operator_less(int@NonNull [] rhs) { return operator_less(new io.qt.core.QVersionNumber(rhs)); } /** *

Overloaded function for {@link #equals(io.qt.core.QVersionNumber)}.

*/ @QtUninvokable public final boolean equals(int@NonNull [] rhs) { return equals(new io.qt.core.QVersionNumber(rhs)); } /** *

Overloaded function for {@link #commonPrefix(io.qt.core.QVersionNumber, io.qt.core.QVersionNumber)}.

*/ public static io.qt.core.@NonNull QVersionNumber commonPrefix(int@NonNull [] v1, io.qt.core.@NonNull QVersionNumber v2) { return commonPrefix(new io.qt.core.QVersionNumber(v1), v2); } /** *

Overloaded function for {@link #commonPrefix(io.qt.core.QVersionNumber, io.qt.core.QVersionNumber)}.

*/ public static io.qt.core.@NonNull QVersionNumber commonPrefix(io.qt.core.@NonNull QVersionNumber v1, int@NonNull [] v2) { return commonPrefix(v1, new io.qt.core.QVersionNumber(v2)); } /** *

Overloaded function for {@link #commonPrefix(io.qt.core.QVersionNumber, io.qt.core.QVersionNumber)}.

*/ public static io.qt.core.@NonNull QVersionNumber commonPrefix(int@NonNull [] v1, int@NonNull [] v2) { return commonPrefix(new io.qt.core.QVersionNumber(v1), new io.qt.core.QVersionNumber(v2)); } /** *

Overloaded function for {@link #compare(io.qt.core.QVersionNumber, io.qt.core.QVersionNumber)}.

*/ public static int compare(int@NonNull [] v1, io.qt.core.@NonNull QVersionNumber v2) { return compare(new io.qt.core.QVersionNumber(v1), v2); } /** *

Overloaded function for {@link #compare(io.qt.core.QVersionNumber, io.qt.core.QVersionNumber)}.

*/ public static int compare(io.qt.core.@NonNull QVersionNumber v1, int@NonNull [] v2) { return compare(v1, new io.qt.core.QVersionNumber(v2)); } /** *

Overloaded function for {@link #compare(io.qt.core.QVersionNumber, io.qt.core.QVersionNumber)}.

*/ public static int compare(int@NonNull [] v1, int@NonNull [] v2) { return compare(new io.qt.core.QVersionNumber(v1), new io.qt.core.QVersionNumber(v2)); } /** *

Overloaded function for {@link #fromString(java.lang.String, int[])} * with suffixIndex = null.

*/ public static io.qt.core.@NonNull QVersionNumber fromString(java.lang.@NonNull String string) { return fromString(string, (int[])null); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy