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

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

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

import io.qt.*;


/**
 * 

Encapsulates a value in JSON

*

Java wrapper for Qt class QJsonValue

*/ public class QJsonValue extends QtObject implements java.lang.Cloneable { static { QtJambi_LibraryUtilities.initialize(); } /** *

Java wrapper for Qt enum QJsonValue::Type

*/ public enum Type implements QtEnumerator { /** *

Representing QJsonValue::Null

*/ Null(0), /** *

Representing QJsonValue::Bool

*/ Bool(1), /** *

Representing QJsonValue::Double

*/ Double(2), /** *

Representing QJsonValue::String

*/ String(3), /** *

Representing QJsonValue::Array

*/ Array(4), /** *

Representing QJsonValue::Object

*/ Object(5), /** *

Representing QJsonValue::Undefined

*/ Undefined(128); static { QtJambi_LibraryUtilities.initialize(); } private Type(int value) { this.value = value; } /** * {@inheritDoc} */ @Override public int value() { return value; } /** * Returns the corresponding enum entry for the given value. * @param value * @return enum entry */ public static @NonNull Type resolve(int value) { switch (value) { case 0: return Null; case 1: return Bool; case 2: return Double; case 3: return String; case 4: return Array; case 5: return Object; case 128: return Undefined; default: throw new QNoSuchEnumValueException(value); } } private final int value; } /** *

See QJsonValue::QJsonValue(QJsonArray)

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

See QJsonValue::QJsonValue(QJsonObject)

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

See QJsonValue::QJsonValue(QJsonValue)

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

See QJsonValue::QJsonValue(QJsonValue::Type)

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

See QJsonValue::QJsonValue(QString)

*/ public QJsonValue(java.lang.@NonNull String s){ super((QPrivateConstructor)null); initialize_native(this, s); } private native static void initialize_native(QJsonValue instance, java.lang.String s); /** *

See QJsonValue::QJsonValue(bool)

*/ public QJsonValue(boolean b){ super((QPrivateConstructor)null); initialize_native(this, b); } private native static void initialize_native(QJsonValue instance, boolean b); /** *

See QJsonValue::QJsonValue(double)

*/ public QJsonValue(double n){ super((QPrivateConstructor)null); initialize_native(this, n); } private native static void initialize_native(QJsonValue instance, double n); /** *

See QJsonValue::QJsonValue(int)

*/ public QJsonValue(int n){ super((QPrivateConstructor)null); initialize_native(this, n); } private native static void initialize_native(QJsonValue instance, int n); /** *

See QJsonValue::QJsonValue(qint64)

*/ public QJsonValue(long v){ super((QPrivateConstructor)null); initialize_native(this, v); } private native static void initialize_native(QJsonValue instance, long v); /** *

See QJsonValue::isArray()const

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

See QJsonValue::isBool()const

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

See QJsonValue::isDouble()const

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

See QJsonValue::isNull()const

*/ @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 QJsonValue::isObject()const

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

See QJsonValue::isString()const

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

See QJsonValue::isUndefined()const

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

See operator<<(QDataStream&,QJsonValue)

*/ @QtUninvokable public void writeTo(io.qt.core.@StrictNonNull 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)); } @QtUninvokable private native void writeTo_native_ref_QDataStream(long __this__nativeId, long arg__1); /** *

See QJsonValue::operator=(QJsonValue)

*/ @QtUninvokable public final void assign(io.qt.core.@NonNull QJsonValue other){ assign_native_cref_QJsonValue(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(other)); } @QtUninvokable private native void assign_native_cref_QJsonValue(long __this__nativeId, long other); /** *

See QJsonValue::operator==(QJsonValue)const

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

See operator>>(QDataStream&,QJsonValue&)

*/ @QtUninvokable public void readFrom(io.qt.core.@StrictNonNull 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)); } @QtUninvokable private native void readFrom_native_ref_QDataStream(long __this__nativeId, long arg__1); /** *

See QJsonValue::operator[](QStringView)const

*/ @QtUninvokable public final io.qt.core.@NonNull QJsonValue get(java.lang.@NonNull String key){ return get_native_QStringView_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), key); } @QtUninvokable private native io.qt.core.QJsonValue get_native_QStringView_constfct(long __this__nativeId, java.lang.String key); /** *

See QJsonValue::operator[](qsizetype)const

*/ @QtUninvokable public final io.qt.core.@NonNull QJsonValue get(long i){ return get_native_qsizetype_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), i); } @QtUninvokable private native io.qt.core.QJsonValue get_native_qsizetype_constfct(long __this__nativeId, long i); /** *

See QJsonValue::swap(QJsonValue&)

*/ @QtUninvokable public final void swap(io.qt.core.@StrictNonNull QJsonValue other){ java.util.Objects.requireNonNull(other, "Argument 'other': null not expected."); swap_native_ref_QJsonValue(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(other)); } @QtUninvokable private native void swap_native_ref_QJsonValue(long __this__nativeId, long other); /** *

See QJsonValue::toArray()const

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

See QJsonValue::toArray(QJsonArray)const

*/ @QtUninvokable public final io.qt.core.@NonNull QJsonArray toArray(io.qt.core.@NonNull QJsonArray defaultValue){ return toArray_native_cref_QJsonArray_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(defaultValue)); } @QtUninvokable private native io.qt.core.QJsonArray toArray_native_cref_QJsonArray_constfct(long __this__nativeId, long defaultValue); /** *

See QJsonValue::toBool(bool)const

*/ @QtUninvokable public final boolean toBoolean(boolean defaultValue){ return toBoolean_native_bool_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), defaultValue); } @QtUninvokable private native boolean toBoolean_native_bool_constfct(long __this__nativeId, boolean defaultValue); /** *

See QJsonValue::toDouble(double)const

*/ @QtUninvokable public final double toDouble(double defaultValue){ return toDouble_native_double_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), defaultValue); } @QtUninvokable private native double toDouble_native_double_constfct(long __this__nativeId, double defaultValue); /** *

See QJsonValue::toInt(int)const

*/ @QtUninvokable public final int toInt(int defaultValue){ return toInt_native_int_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), defaultValue); } @QtUninvokable private native int toInt_native_int_constfct(long __this__nativeId, int defaultValue); /** *

See QJsonValue::toInteger(qint64)const

*

This function was introduced in Qt 6.0.

*/ @QtUninvokable public final long toInteger(long defaultValue){ return toInteger_native_qint64_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), defaultValue); } @QtUninvokable private native long toInteger_native_qint64_constfct(long __this__nativeId, long defaultValue); /** *

See QJsonValue::toObject()const

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

See QJsonValue::toObject(QJsonObject)const

*/ @QtUninvokable public final io.qt.core.@NonNull QJsonObject toObject(io.qt.core.@NonNull QJsonObject defaultValue){ return toObject_native_cref_QJsonObject_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(defaultValue)); } @QtUninvokable private native io.qt.core.QJsonObject toObject_native_cref_QJsonObject_constfct(long __this__nativeId, long defaultValue); /** *

See QJsonValue::toString()const

*/ @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 QJsonValue::toString(QString)const

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

See QJsonValue::toVariant()const

*/ @QtUninvokable public final java.lang.Object toVariant(){ return toVariant_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)); } @QtUninvokable private native java.lang.Object toVariant_native_constfct(long __this__nativeId); /** *

See QJsonValue::type()const

*/ @QtUninvokable public final io.qt.core.QJsonValue.@NonNull Type type(){ return io.qt.core.QJsonValue.Type.resolve(type_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this))); } @QtUninvokable private native int type_native_constfct(long __this__nativeId); /** *

See QJsonValue::fromVariant(QVariant)

*/ public native static io.qt.core.@NonNull QJsonValue fromVariant(java.lang.Object variant); /** * Constructor for internal use only. * @param p expected to be null. * @hidden */ @NativeAccess protected QJsonValue(QPrivateConstructor p) { super(p); } /** *

See QJsonValue::operator==(QJsonValue)const

*/ @Override @QtUninvokable public boolean equals(Object other) { if (other==null || other instanceof io.qt.core.QJsonValue) { return equals((io.qt.core.QJsonValue) other); } return false; } /** * Returns the objects's hash code computed by qHash(QJsonValue). */ @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 QJsonValue::QJsonValue(QJsonValue)

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

Overloaded constructor for {@link #QJsonValue(io.qt.core.QJsonValue.Type)} * with arg__1 = io.qt.core.QJsonValue.Type.Null.

*/ public QJsonValue() { this(io.qt.core.QJsonValue.Type.Null); } /** *

Overloaded function for {@link #assign(io.qt.core.QJsonValue)}.

*/ @QtUninvokable public final void assign(io.qt.core.QJsonValue.@NonNull Type other) { assign(new io.qt.core.QJsonValue(other)); } /** *

Overloaded function for {@link #assign(io.qt.core.QJsonValue)}.

*/ @QtUninvokable public final void assign(boolean other) { assign(new io.qt.core.QJsonValue(other)); } /** *

Overloaded function for {@link #assign(io.qt.core.QJsonValue)}.

*/ @QtUninvokable public final void assign(double other) { assign(new io.qt.core.QJsonValue(other)); } /** *

Overloaded function for {@link #assign(io.qt.core.QJsonValue)}.

*/ @QtUninvokable public final void assign(int other) { assign(new io.qt.core.QJsonValue(other)); } /** *

Overloaded function for {@link #assign(io.qt.core.QJsonValue)}.

*/ @QtUninvokable public final void assign(long other) { assign(new io.qt.core.QJsonValue(other)); } /** *

Overloaded function for {@link #assign(io.qt.core.QJsonValue)}.

*/ @QtUninvokable public final void assign(java.lang.@NonNull String other) { assign(new io.qt.core.QJsonValue(other)); } /** *

Overloaded function for {@link #assign(io.qt.core.QJsonValue)}.

*/ @QtUninvokable public final void assign(io.qt.core.@NonNull QJsonArray other) { assign(new io.qt.core.QJsonValue(other)); } /** *

Overloaded function for {@link #assign(io.qt.core.QJsonValue)}.

*/ @QtUninvokable public final void assign(io.qt.core.@NonNull QJsonObject other) { assign(new io.qt.core.QJsonValue(other)); } /** *

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

*/ @QtUninvokable public final boolean equals(io.qt.core.QJsonValue.@NonNull Type other) { return equals(new io.qt.core.QJsonValue(other)); } /** *

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

*/ @QtUninvokable public final boolean equals(boolean other) { return equals(new io.qt.core.QJsonValue(other)); } /** *

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

*/ @QtUninvokable public final boolean equals(double other) { return equals(new io.qt.core.QJsonValue(other)); } /** *

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

*/ @QtUninvokable public final boolean equals(int other) { return equals(new io.qt.core.QJsonValue(other)); } /** *

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

*/ @QtUninvokable public final boolean equals(long other) { return equals(new io.qt.core.QJsonValue(other)); } /** *

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

*/ @QtUninvokable public final boolean equals(java.lang.@NonNull String other) { return equals(new io.qt.core.QJsonValue(other)); } /** *

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

*/ @QtUninvokable public final boolean equals(io.qt.core.@NonNull QJsonArray other) { return equals(new io.qt.core.QJsonValue(other)); } /** *

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

*/ @QtUninvokable public final boolean equals(io.qt.core.@NonNull QJsonObject other) { return equals(new io.qt.core.QJsonValue(other)); } /** *

Delegate for {@link #get(java.lang.String)}.

*/ @QtUninvokable public final io.qt.core.@NonNull QJsonValue getObjectValue(java.lang.@NonNull String key) { return get(key); } /** *

Delegate for {@link #get(long)}.

*/ @QtUninvokable public final io.qt.core.@NonNull QJsonValue getArrayValue(long i) { return get(i); } /** *

Overloaded function for {@link #toBoolean(boolean)} * with defaultValue = false.

*/ @QtUninvokable public final boolean toBoolean() { return toBoolean((boolean)false); } /** *

Overloaded function for {@link #toDouble(double)} * with defaultValue = 0.

*/ @QtUninvokable public final double toDouble() { return toDouble((double)0); } /** *

Overloaded function for {@link #toInt(int)} * with defaultValue = 0.

*/ @QtUninvokable public final int toInt() { return toInt((int)0); } /** *

Overloaded function for {@link #toInteger(long)} * with defaultValue = 0.

*/ @QtUninvokable public final long toInteger() { return toInteger((long)0); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy