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

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

The newest version!
package io.qt.core;


/**
 * 

Array of bits

*

Java wrapper for Qt class QBitArray

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

See QBitArray::QBitArray()

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

See QBitArray::QBitArray(QBitArray)

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

Overloaded constructor for {@link #QBitArray(long, boolean)} * with val = false.

*/ public QBitArray(long size) { this(size, (boolean)false); } /** *

See QBitArray::QBitArray(qsizetype,bool)

*/ public QBitArray(long size, boolean val){ super((QPrivateConstructor)null); initialize_native(this, size, val); } private native static void initialize_native(QBitArray instance, long size, boolean val); /** *

See QBitArray::at(qsizetype)const

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

See QBitArray::bits()const

*/ @io.qt.QtUninvokable public final java.nio.ByteBuffer bits(){ return bits_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)); } @io.qt.QtUninvokable private native java.nio.ByteBuffer bits_native_constfct(long __this__nativeId); /** *

See QBitArray::clear()

*/ @io.qt.QtUninvokable public final void clear(){ clear_native(QtJambi_LibraryUtilities.internal.nativeId(this)); } @io.qt.QtUninvokable private native void clear_native(long __this__nativeId); /** *

See QBitArray::clearBit(qsizetype)

*/ @io.qt.QtUninvokable public final void clearBit(long i){ clearBit_native_qsizetype(QtJambi_LibraryUtilities.internal.nativeId(this), i); } @io.qt.QtUninvokable private native void clearBit_native_qsizetype(long __this__nativeId, long i); /** *

See QBitArray::count()const

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

See QBitArray::count(bool)const

*/ @io.qt.QtUninvokable public final long count(boolean on){ return count_native_bool_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), on); } @io.qt.QtUninvokable private native long count_native_bool_constfct(long __this__nativeId, boolean on); @io.qt.QtUninvokable public final void detach(){ detach_native(QtJambi_LibraryUtilities.internal.nativeId(this)); } @io.qt.QtUninvokable private native void detach_native(long __this__nativeId); /** *

See QBitArray::fill(bool,qsizetype,qsizetype)

*/ @io.qt.QtUninvokable public final void fill(boolean val, long first, long last){ fill_native_bool_qsizetype_qsizetype(QtJambi_LibraryUtilities.internal.nativeId(this), val, first, last); } @io.qt.QtUninvokable private native void fill_native_bool_qsizetype_qsizetype(long __this__nativeId, boolean val, long first, long last); /** *

Overloaded function for {@link #fill(boolean, long)} * with size = -1.

*/ @io.qt.QtUninvokable public final boolean fill(boolean val) { return fill(val, (long)-1); } /** *

See QBitArray::fill(bool,qsizetype)

*/ @io.qt.QtUninvokable public final boolean fill(boolean val, long size){ return fill_native_bool_qsizetype(QtJambi_LibraryUtilities.internal.nativeId(this), val, size); } @io.qt.QtUninvokable private native boolean fill_native_bool_qsizetype(long __this__nativeId, boolean val, long size); @io.qt.QtUninvokable public final boolean isDetached(){ return isDetached_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)); } @io.qt.QtUninvokable private native boolean isDetached_native_constfct(long __this__nativeId); /** *

See QBitArray::isEmpty()const

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

See QBitArray::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 QBitArray::operator&=(QBitArray)

*/ @io.qt.QtUninvokable public final io.qt.core.QBitArray and(io.qt.core.QBitArray arg__1){ and_native_cref_QBitArray(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(arg__1)); return this; } @io.qt.QtUninvokable private native io.qt.core.QBitArray and_native_cref_QBitArray(long __this__nativeId, long arg__1); @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); /** *

See QBitArray::operator=(QBitArray)

*/ @io.qt.QtUninvokable public final io.qt.core.QBitArray set(io.qt.core.QBitArray other){ set_native_cref_QBitArray(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(other)); return this; } @io.qt.QtUninvokable private native io.qt.core.QBitArray set_native_cref_QBitArray(long __this__nativeId, long other); /** *

See QBitArray::operator==(QBitArray)const

*/ @io.qt.QtUninvokable private final boolean operator_equal(io.qt.core.QBitArray other){ return operator_equal_native_cref_QBitArray_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(other)); } @io.qt.QtUninvokable private native boolean operator_equal_native_cref_QBitArray_constfct(long __this__nativeId, long other); @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); /** *

See QBitArray::operator^=(QBitArray)

*/ @io.qt.QtUninvokable public final io.qt.core.QBitArray xor(io.qt.core.QBitArray arg__1){ xor_native_cref_QBitArray(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(arg__1)); return this; } @io.qt.QtUninvokable private native io.qt.core.QBitArray xor_native_cref_QBitArray(long __this__nativeId, long arg__1); /** *

See QBitArray::operator|=(QBitArray)

*/ @io.qt.QtUninvokable public final io.qt.core.QBitArray or(io.qt.core.QBitArray arg__1){ or_native_cref_QBitArray(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(arg__1)); return this; } @io.qt.QtUninvokable private native io.qt.core.QBitArray or_native_cref_QBitArray(long __this__nativeId, long arg__1); /** *

See QBitArray::operator~()const

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

See QBitArray::resize(qsizetype)

*/ @io.qt.QtUninvokable public final void resize(long size){ resize_native_qsizetype(QtJambi_LibraryUtilities.internal.nativeId(this), size); } @io.qt.QtUninvokable private native void resize_native_qsizetype(long __this__nativeId, long size); /** *

See QBitArray::setBit(qsizetype)

*/ @io.qt.QtUninvokable public final void setBit(long i){ setBit_native_qsizetype(QtJambi_LibraryUtilities.internal.nativeId(this), i); } @io.qt.QtUninvokable private native void setBit_native_qsizetype(long __this__nativeId, long i); /** *

See QBitArray::setBit(qsizetype,bool)

*/ @io.qt.QtUninvokable public final void setBit(long i, boolean val){ setBit_native_qsizetype_bool(QtJambi_LibraryUtilities.internal.nativeId(this), i, val); } @io.qt.QtUninvokable private native void setBit_native_qsizetype_bool(long __this__nativeId, long i, boolean val); /** *

See QBitArray::size()const

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

See QBitArray::swap(QBitArray&)

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

See QBitArray::testBit(qsizetype)const

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

See QBitArray::toUInt32(QSysInfo::Endian,bool*)const

*/ @io.qt.QtUninvokable public final java.lang.Integer toInteger(io.qt.core.QSysInfo.Endian endianness){ return toInteger_native_QSysInfo_Endian_bool_ptr_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), endianness.value()); } @io.qt.QtUninvokable private native java.lang.Integer toInteger_native_QSysInfo_Endian_bool_ptr_constfct(long __this__nativeId, int endianness); /** *

See QBitArray::toggleBit(qsizetype)

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

See QBitArray::truncate(qsizetype)

*/ @io.qt.QtUninvokable public final void truncate(long pos){ truncate_native_qsizetype(QtJambi_LibraryUtilities.internal.nativeId(this), pos); } @io.qt.QtUninvokable private native void truncate_native_qsizetype(long __this__nativeId, long pos); /** *

See QBitArray::fromBits(const char*,qsizetype)

*/ public native static io.qt.core.QBitArray fromBits(java.nio.Buffer data, long len); /** * Constructor for internal use only. * @param p expected to be null. */ @io.qt.NativeAccess protected QBitArray(QPrivateConstructor p) { super(p); } @Override @io.qt.QtUninvokable public boolean equals(Object other) { if (other instanceof io.qt.core.QBitArray) { return operator_equal((io.qt.core.QBitArray) other); } return false; } @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); @io.qt.QtUninvokable public final boolean[] toBitArray() { long size = size(); if(size>Integer.MAX_VALUE) throw new RuntimeException("Size of QBitArray exceeds max array size."); boolean[] res = new boolean[(int)size]; for (int i = 0; i < size; i++) { res[i] = testBit(i); } return res; } public static io.qt.core.QBitArray fromBits(boolean[] data){ io.qt.core.QBitArray array = new io.qt.core.QBitArray(data.length); for (int i = 0; i < data.length; i++) { if(data[i]) array.setBit(i); } return array; } public static io.qt.core.QBitArray fromBits(byte[] data){ return fromBits(java.nio.ByteBuffer.wrap(data), data.length*8); } @Override @io.qt.QtUninvokable public String toString() { return toString_native(QtJambi_LibraryUtilities.internal.nativeId(this)); } @io.qt.QtUninvokable private static native String toString_native(long __this_nativeId); @Override public QBitArray clone() { return clone_native(QtJambi_LibraryUtilities.internal.nativeId(this)); } private native QBitArray clone_native(long __this_nativeId); }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy