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

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

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

import io.qt.*;


/**
 * 

Array of bits

*

Java wrapper for Qt class QBitArray

*/ public class QBitArray extends 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.@NonNull QBitArray other){ super((QPrivateConstructor)null); initialize_native(this, other); } private native static void initialize_native(QBitArray instance, io.qt.core.QBitArray other); /** *

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

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

See QBitArray::bits()const

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

See QBitArray::clear()

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

See QBitArray::clearBit(qsizetype)

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

See QBitArray::count()const

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

See QBitArray::count(bool)const

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

See QBitArray::detach()

*/ @QtUninvokable public final void detach(){ detach_native(QtJambi_LibraryUtilities.internal.nativeId(this)); } @QtUninvokable private native void detach_native(long __this__nativeId); /** *

See QBitArray::fill(bool,qsizetype)

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

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

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

See QBitArray::isDetached()const

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

See QBitArray::isEmpty()const

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

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

*/ @QtUninvokable public final io.qt.core.@NonNull QBitArray and(io.qt.core.@NonNull QBitArray arg__2){ return and_native_cref_QBitArray(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(arg__2)); } @QtUninvokable private native io.qt.core.QBitArray and_native_cref_QBitArray(long __this__nativeId, long arg__2); /** *

See operator<<(QDataStream&,QBitArray)

*/ @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 QBitArray::operator=(QBitArray)

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

See QBitArray::operator==(QBitArray)const

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

See operator>>(QDataStream&,QBitArray&)

*/ @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 QBitArray::operator[](qsizetype)const

*/ @QtUninvokable public final boolean get(long i){ if(i<0 || i>size()) throw new IndexOutOfBoundsException(""+i); return get_native_qsizetype_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), i); } @QtUninvokable private native boolean get_native_qsizetype_constfct(long __this__nativeId, long i); /** *

See QBitArray::operator[](qsizetype)

*/ @QtUninvokable public final void set(long i, boolean value){ if(i<0 || i>size()) throw new IndexOutOfBoundsException(""+i); set_native_qsizetype_bool(QtJambi_LibraryUtilities.internal.nativeId(this), i, value); } @QtUninvokable private native void set_native_qsizetype_bool(long __this__nativeId, long i, boolean value); /** *

See operator^(QBitArray,QBitArray)

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

See operator|(QBitArray,QBitArray)

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

See QBitArray::operator~()const

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

See QBitArray::resize(qsizetype)

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

See QBitArray::setBit(qsizetype)

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

See QBitArray::setBit(qsizetype,bool)

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

See QBitArray::size()const

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

See QBitArray::swap(QBitArray&)

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

See QBitArray::testBit(qsizetype)const

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

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

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

See QBitArray::toggleBit(qsizetype)

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

See QBitArray::truncate(qsizetype)

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

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

*/ public native static io.qt.core.@NonNull QBitArray fromBits(java.nio.@Nullable ByteBuffer data); /** * Constructor for internal use only. * @param p expected to be null. * @hidden */ @NativeAccess protected QBitArray(QPrivateConstructor p) { super(p); } /** *

See QBitArray::operator==(QBitArray)const

*/ @Override @QtUninvokable public boolean equals(Object other) { if (other instanceof io.qt.core.QBitArray) { return equals((io.qt.core.QBitArray) other); } return false; } /** * Returns the objects's hash code computed by qHash(QBitArray). */ @QtUninvokable @Override public int hashCode() { return hashCode_native(QtJambi_LibraryUtilities.internal.nativeId(this)); } @QtUninvokable private native static int hashCode_native(long __this_nativeId); @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 QBitArray fromBits(boolean[] data){ QBitArray array = new QBitArray(data.length); for (int i = 0; i < data.length; i++) { if(data[i]) array.setBit(i); } return array; } /** *

See operator<<(QDebug,QBitArray)

*/ @QtUninvokable @Override public @NonNull String toString() { return toString_native(QtJambi_LibraryUtilities.internal.nativeId(this)); } @QtUninvokable private static native String toString_native(long __this_nativeId); /** *

Creates and returns a copy of this object.

See QBitArray::QBitArray(QBitArray)

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

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

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

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

*/ @QtUninvokable public final boolean fill(boolean val) { return fill(val, (long)-1); } /** * @deprecated Use {@link #assign(io.qt.core.QBitArray)} instead. */ @Deprecated @QtUninvokable public final void set(io.qt.core.@NonNull QBitArray other) { assign(other); } /** *

Overloaded function for {@link #fromBits(java.nio.ByteBuffer)}.

*/ public static io.qt.core.@NonNull QBitArray fromBits(byte[] data, int offsetOfData, int len) { return fromBits(data==null ? null : java.nio.ByteBuffer.wrap(data, offsetOfData, len)); } /** *

Overloaded function for {@link #fromBits(java.nio.ByteBuffer)}.

*/ public static io.qt.core.@NonNull QBitArray fromBits(byte[] data) { return fromBits(data==null ? null : java.nio.ByteBuffer.wrap(data)); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy