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

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

The newest version!
package io.qt.core;


/**
 * 

Stores a Universally Unique Identifier (UUID)

*

Java wrapper for Qt class QUuid

*/ public class QUuid extends io.qt.QtObject implements java.lang.Comparable, java.lang.Cloneable { static { QtJambi_LibraryUtilities.initialize(); } /** *

Java wrapper for Qt enum QUuid::StringFormat

*/ public enum StringFormat implements io.qt.QtEnumerator { WithBraces(0), WithoutBraces(1), Id128(3); private StringFormat(int value) { this.value = value; } /** * {@inheritDoc} */ public int value() { return value; } /** * Returns the corresponding enum entry for the given value. * @param value * @return enum entry */ public static StringFormat resolve(int value) { switch (value) { case 0: return WithBraces; case 1: return WithoutBraces; case 3: return Id128; default: throw new io.qt.QNoSuchEnumValueException(value); } } private final int value; } /** *

Java wrapper for Qt enum QUuid::Variant

*/ public enum Variant implements io.qt.QtEnumerator { VarUnknown(-1), NCS(0), DCE(2), Microsoft(6), Reserved(7); private Variant(int value) { this.value = value; } /** * {@inheritDoc} */ public int value() { return value; } /** * Returns the corresponding enum entry for the given value. * @param value * @return enum entry */ public static Variant resolve(int value) { switch (value) { case -1: return VarUnknown; case 0: return NCS; case 2: return DCE; case 6: return Microsoft; case 7: return Reserved; default: throw new io.qt.QNoSuchEnumValueException(value); } } private final int value; } /** *

Java wrapper for Qt enum QUuid::Version

*/ @io.qt.QtRejectedEntries({"Name"}) public enum Version implements io.qt.QtEnumerator { VerUnknown(-1), Time(1), EmbeddedPOSIX(2), Md5(3), Name(3), Random(4), Sha1(5); private Version(int value) { this.value = value; } /** * {@inheritDoc} */ public int value() { return value; } /** * Returns the corresponding enum entry for the given value. * @param value * @return enum entry */ public static Version resolve(int value) { switch (value) { case -1: return VerUnknown; case 1: return Time; case 2: return EmbeddedPOSIX; case 3: return Md5; case 4: return Random; case 5: return Sha1; default: throw new io.qt.QNoSuchEnumValueException(value); } } private final int value; } /** *

See QUuid::QUuid()

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

See QUuid::QUuid(QAnyStringView)

*/ public QUuid(java.lang.String string){ super((QPrivateConstructor)null); initialize_native(this, string); } private native static void initialize_native(QUuid instance, java.lang.String string); /** *

See QUuid::QUuid(uint,ushort,ushort,uchar,uchar,uchar,uchar,uchar,uchar,uchar,uchar)

*/ public QUuid(int l, short w1, short w2, byte b1, byte b2, byte b3, byte b4, byte b5, byte b6, byte b7, byte b8){ super((QPrivateConstructor)null); initialize_native(this, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8); } private native static void initialize_native(QUuid instance, int l, short w1, short w2, byte b1, byte b2, byte b3, byte b4, byte b5, byte b6, byte b7, byte b8); /** *

See QUuid::isNull()const

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

See QUuid::operator<(QUuid)const

*/ @io.qt.QtUninvokable private final boolean operator_less(io.qt.core.QUuid other){ return operator_less_native_cref_QUuid_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(other)); } @io.qt.QtUninvokable private native boolean operator_less_native_cref_QUuid_constfct(long __this__nativeId, long other); @io.qt.QtUninvokable public void writeTo(io.qt.core.QDataStream arg__1){ java.util.Objects.requireNonNull(arg__1, "Argument 'arg__1': null not expected."); writeTo_native_ref_QDataStream(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(arg__1)); } @io.qt.QtUninvokable private native void writeTo_native_ref_QDataStream(long __this__nativeId, long arg__1); @io.qt.QtUninvokable private final boolean operator_less_or_equal(io.qt.core.QUuid rhs){ return operator_less_or_equal_native_cref_QUuid(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(rhs)); } @io.qt.QtUninvokable private native boolean operator_less_or_equal_native_cref_QUuid(long __this__nativeId, long rhs); /** *

See QUuid::operator==(QUuid)const

*/ @io.qt.QtUninvokable private final boolean operator_equal(io.qt.core.QUuid orig){ return operator_equal_native_cref_QUuid_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(orig)); } @io.qt.QtUninvokable private native boolean operator_equal_native_cref_QUuid_constfct(long __this__nativeId, long orig); @io.qt.QtUninvokable public void readFrom(io.qt.core.QDataStream arg__1){ java.util.Objects.requireNonNull(arg__1, "Argument 'arg__1': null not expected."); readFrom_native_ref_QDataStream(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(arg__1)); } @io.qt.QtUninvokable private native void readFrom_native_ref_QDataStream(long __this__nativeId, long arg__1); /** *

Overloaded function for {@link #toByteArray(io.qt.core.QUuid.StringFormat)} * with mode = io.qt.core.QUuid.StringFormat.WithBraces.

*/ @io.qt.QtUninvokable public final io.qt.core.QByteArray toByteArray() { return toByteArray(io.qt.core.QUuid.StringFormat.WithBraces); } /** *

See QUuid::toByteArray(QUuid::StringFormat)const

*/ @io.qt.QtUninvokable public final io.qt.core.QByteArray toByteArray(io.qt.core.QUuid.StringFormat mode){ return toByteArray_native_QUuid_StringFormat_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), mode.value()); } @io.qt.QtUninvokable private native io.qt.core.QByteArray toByteArray_native_QUuid_StringFormat_constfct(long __this__nativeId, int mode); /** *

See QUuid::toRfc4122()const

*/ @io.qt.QtUninvokable public final io.qt.core.QByteArray toRfc4122(){ return toRfc4122_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)); } @io.qt.QtUninvokable private native io.qt.core.QByteArray toRfc4122_native_constfct(long __this__nativeId); /** *

Overloaded function for {@link #toString(io.qt.core.QUuid.StringFormat)} * with mode = io.qt.core.QUuid.StringFormat.WithBraces.

*/ @io.qt.QtUninvokable public final java.lang.String toString() { return toString(io.qt.core.QUuid.StringFormat.WithBraces); } /** *

See QUuid::toString(QUuid::StringFormat)const

*/ @io.qt.QtUninvokable public final java.lang.String toString(io.qt.core.QUuid.StringFormat mode){ return toString_native_QUuid_StringFormat_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), mode.value()); } @io.qt.QtUninvokable private native java.lang.String toString_native_QUuid_StringFormat_constfct(long __this__nativeId, int mode); /** *

See QUuid::variant()const

*/ @io.qt.QtUninvokable public final io.qt.core.QUuid.Variant variant(){ return io.qt.core.QUuid.Variant.resolve(variant_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this))); } @io.qt.QtUninvokable private native int variant_native_constfct(long __this__nativeId); /** *

See QUuid::version()const

*/ @io.qt.QtUninvokable public final io.qt.core.QUuid.Version version(){ return io.qt.core.QUuid.Version.resolve(version_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this))); } @io.qt.QtUninvokable private native int version_native_constfct(long __this__nativeId); /** *

See QUuid::createUuid()

*/ public native static io.qt.core.QUuid createUuid(); /** *

See QUuid::createUuidV3(QUuid,QByteArray)

*/ public static io.qt.core.QUuid createUuidV3(io.qt.core.QUuid ns, io.qt.core.QByteArray baseData){ return createUuidV3_native_cref_QUuid_cref_QByteArray(QtJambi_LibraryUtilities.internal.checkedNativeId(ns), QtJambi_LibraryUtilities.internal.checkedNativeId(baseData)); } private native static io.qt.core.QUuid createUuidV3_native_cref_QUuid_cref_QByteArray(long ns, long baseData); /** *

See QUuid::createUuidV3(QUuid,QString)

*/ public static io.qt.core.QUuid createUuidV3(io.qt.core.QUuid ns, java.lang.String baseData){ return createUuidV3_native_cref_QUuid_cref_QString(QtJambi_LibraryUtilities.internal.checkedNativeId(ns), baseData); } private native static io.qt.core.QUuid createUuidV3_native_cref_QUuid_cref_QString(long ns, java.lang.String baseData); /** *

See QUuid::createUuidV5(QUuid,QByteArray)

*/ public static io.qt.core.QUuid createUuidV5(io.qt.core.QUuid ns, io.qt.core.QByteArray baseData){ return createUuidV5_native_cref_QUuid_cref_QByteArray(QtJambi_LibraryUtilities.internal.checkedNativeId(ns), QtJambi_LibraryUtilities.internal.checkedNativeId(baseData)); } private native static io.qt.core.QUuid createUuidV5_native_cref_QUuid_cref_QByteArray(long ns, long baseData); /** *

See QUuid::createUuidV5(QUuid,QString)

*/ public static io.qt.core.QUuid createUuidV5(io.qt.core.QUuid ns, java.lang.String baseData){ return createUuidV5_native_cref_QUuid_cref_QString(QtJambi_LibraryUtilities.internal.checkedNativeId(ns), baseData); } private native static io.qt.core.QUuid createUuidV5_native_cref_QUuid_cref_QString(long ns, java.lang.String baseData); /** *

See QUuid::fromRfc4122(QByteArrayView)

*/ public static io.qt.core.QUuid fromRfc4122(io.qt.core.QByteArrayView arg__1){ return fromRfc4122_native_QByteArrayView(QtJambi_LibraryUtilities.internal.checkedNativeId(arg__1)); } private native static io.qt.core.QUuid fromRfc4122_native_QByteArrayView(long arg__1); /** *

See QUuid::fromString(QAnyStringView)

*/ public native static io.qt.core.QUuid fromString(java.lang.String string); @io.qt.QtUninvokable public final void setData1(int data1){ setData1_native_uint(QtJambi_LibraryUtilities.internal.nativeId(this), data1); } @io.qt.QtUninvokable private native void setData1_native_uint(long __this__nativeId, int data1); @io.qt.QtUninvokable public final int data1(){ return data1_native(QtJambi_LibraryUtilities.internal.nativeId(this)); } @io.qt.QtUninvokable private native int data1_native(long __this__nativeId); @io.qt.QtUninvokable public final void setData2(short data2){ setData2_native_unsigned_short(QtJambi_LibraryUtilities.internal.nativeId(this), data2); } @io.qt.QtUninvokable private native void setData2_native_unsigned_short(long __this__nativeId, short data2); @io.qt.QtUninvokable public final short data2(){ return data2_native(QtJambi_LibraryUtilities.internal.nativeId(this)); } @io.qt.QtUninvokable private native short data2_native(long __this__nativeId); @io.qt.QtUninvokable public final void setData3(short data3){ setData3_native_unsigned_short(QtJambi_LibraryUtilities.internal.nativeId(this), data3); } @io.qt.QtUninvokable private native void setData3_native_unsigned_short(long __this__nativeId, short data3); @io.qt.QtUninvokable public final short data3(){ return data3_native(QtJambi_LibraryUtilities.internal.nativeId(this)); } @io.qt.QtUninvokable private native short data3_native(long __this__nativeId); @io.qt.QtUninvokable public final void setData4(byte[] data4){ if (data4.length != 8) throw new IllegalArgumentException("Argument 'data4': Wrong number of elements in array. Found: " + data4.length + ", expected: 8"); setData4_native_cref_Array(QtJambi_LibraryUtilities.internal.nativeId(this), data4); } @io.qt.QtUninvokable private native void setData4_native_cref_Array(long __this__nativeId, byte[] data4); @io.qt.QtUninvokable public final byte[] data4(){ return data4_native(QtJambi_LibraryUtilities.internal.nativeId(this)); } @io.qt.QtUninvokable private native byte[] data4_native(long __this__nativeId); /** * Constructor for internal use only. * @param p expected to be null. */ @io.qt.NativeAccess protected QUuid(QPrivateConstructor p) { super(p); } @Override @io.qt.QtUninvokable public boolean equals(Object other) { if (other instanceof io.qt.core.QUuid) { return operator_equal((io.qt.core.QUuid) other); } return false; } @io.qt.QtUninvokable public int compareTo(io.qt.core.QUuid other) { if (equals(other)) return 0; else if (operator_less(other)) return -1; else return 1; } @io.qt.QtUninvokable @Override public int hashCode() { return hashCode_native(QtJambi_LibraryUtilities.internal.nativeId(this)); } @io.qt.QtUninvokable private native static int hashCode_native(long __this_nativeId); public static io.qt.core.QUuid fromRfc4122(io.qt.core.QByteArray data){ return fromRfc4122(new io.qt.core.QByteArrayView(data)); } public static io.qt.core.QUuid fromRfc4122(byte[] data){ return fromRfc4122(new io.qt.core.QByteArrayView(data)); } public static io.qt.core.QUuid fromRfc4122(String data){ return fromRfc4122(new io.qt.core.QByteArrayView(data)); } public static io.qt.core.QUuid fromRfc4122(java.nio.ByteBuffer data){ return fromRfc4122(new io.qt.core.QByteArrayView(data)); } @Override public QUuid clone() { return clone_native(QtJambi_LibraryUtilities.internal.nativeId(this)); } private native QUuid clone_native(long __this_nativeId); }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy