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

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

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

import io.qt.*;


/**
 * 

Compares strings according to a localized collation algorithm

*

Java wrapper for Qt class QCollator

*/ public class QCollator extends QtObject implements java.lang.Cloneable, java.util.Comparator<@StrictNonNull String> { static { QtJambi_LibraryUtilities.initialize(); } /** *

See QCollator::QCollator()

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

See QCollator::QCollator(QCollator)

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

See QCollator::QCollator(QLocale)

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

See QCollator::caseSensitivity()const

*/ @QtUninvokable public final io.qt.core.Qt.@NonNull CaseSensitivity caseSensitivity(){ return io.qt.core.Qt.CaseSensitivity.resolve(caseSensitivity_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this))); } @QtUninvokable private native int caseSensitivity_native_constfct(long __this__nativeId); /** *

See QCollator::compare(QString,QString)const

*/ @QtUninvokable public final int compare(java.lang.@NonNull CharSequence s1, java.lang.@NonNull CharSequence s2){ return compare_native_cref_QString_cref_QString_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), s1, s2); } @QtUninvokable private native int compare_native_cref_QString_cref_QString_constfct(long __this__nativeId, java.lang.CharSequence s1, java.lang.CharSequence s2); /** *

See QCollator::compare(QStringView,QStringView)const

*/ @QtUninvokable public final int compare(java.lang.@NonNull String s1, java.lang.@NonNull String s2){ return compare_native_QStringView_QStringView_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), s1, s2); } @QtUninvokable private native int compare_native_QStringView_QStringView_constfct(long __this__nativeId, java.lang.String s1, java.lang.String s2); /** *

See QCollator::compare(const QChar*,qsizetype,const QChar*,qsizetype)const

*/ @QtUninvokable public final int compare(java.nio.@Nullable CharBuffer s1, java.nio.@Nullable CharBuffer s2){ return compare_native_const_QChar_ptr_qsizetype_const_QChar_ptr_qsizetype_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), s1, s2); } @QtUninvokable private native int compare_native_const_QChar_ptr_qsizetype_const_QChar_ptr_qsizetype_constfct(long __this__nativeId, java.nio.CharBuffer s1, java.nio.CharBuffer s2); /** *

See QCollator::ignorePunctuation()const

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

See QCollator::locale()const

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

See QCollator::numericMode()const

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

See QCollator::operator()(QString,QString)const

*/ @QtUninvokable public final boolean invoke(java.lang.@NonNull CharSequence s1, java.lang.@NonNull CharSequence s2){ return invoke_native_cref_QString_cref_QString_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), s1, s2); } @QtUninvokable private native boolean invoke_native_cref_QString_cref_QString_constfct(long __this__nativeId, java.lang.CharSequence s1, java.lang.CharSequence s2); /** *

See QCollator::operator()(QStringView,QStringView)const

*/ @QtUninvokable public final boolean invoke(java.lang.@NonNull String s1, java.lang.@NonNull String s2){ return invoke_native_QStringView_QStringView_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), s1, s2); } @QtUninvokable private native boolean invoke_native_QStringView_QStringView_constfct(long __this__nativeId, java.lang.String s1, java.lang.String s2); /** *

See QCollator::operator=(QCollator)

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

See operator==(QCollator,QCollator)

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

See QCollator::setCaseSensitivity(Qt::CaseSensitivity)

*/ @QtUninvokable public final void setCaseSensitivity(io.qt.core.Qt.@NonNull CaseSensitivity cs){ setCaseSensitivity_native_Qt_CaseSensitivity(QtJambi_LibraryUtilities.internal.nativeId(this), cs.value()); } @QtUninvokable private native void setCaseSensitivity_native_Qt_CaseSensitivity(long __this__nativeId, int cs); /** *

See QCollator::setIgnorePunctuation(bool)

*/ @QtUninvokable public final void setIgnorePunctuation(boolean on){ setIgnorePunctuation_native_bool(QtJambi_LibraryUtilities.internal.nativeId(this), on); } @QtUninvokable private native void setIgnorePunctuation_native_bool(long __this__nativeId, boolean on); /** *

See QCollator::setLocale(QLocale)

*/ @QtUninvokable public final void setLocale(io.qt.core.@NonNull QLocale locale){ setLocale_native_cref_QLocale(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(locale)); } @QtUninvokable private native void setLocale_native_cref_QLocale(long __this__nativeId, long locale); /** *

See QCollator::setNumericMode(bool)

*/ @QtUninvokable public final void setNumericMode(boolean on){ setNumericMode_native_bool(QtJambi_LibraryUtilities.internal.nativeId(this), on); } @QtUninvokable private native void setNumericMode_native_bool(long __this__nativeId, boolean on); /** *

See QCollator::sortKey(QString)const

*/ @QtUninvokable public final io.qt.core.@NonNull QCollatorSortKey sortKey(java.lang.@NonNull String string){ return sortKey_native_cref_QString_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), string); } @QtUninvokable private native io.qt.core.QCollatorSortKey sortKey_native_cref_QString_constfct(long __this__nativeId, java.lang.String string); /** *

See QCollator::swap(QCollator&)

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

See QCollator::defaultCompare(QStringView,QStringView)

*/ public native static int defaultCompare(java.lang.@NonNull String s1, java.lang.@NonNull String s2); /** *

See QCollator::defaultSortKey(QStringView)

*/ public native static io.qt.core.@NonNull QCollatorSortKey defaultSortKey(java.lang.@NonNull String key); /** * Constructor for internal use only. * @param p expected to be null. * @hidden */ @NativeAccess protected QCollator(QPrivateConstructor p) { super(p); } /** *

See operator==(QCollator,QCollator)

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

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

Overloaded constructor for {@link #QCollator(io.qt.core.QLocale)}.

*/ public QCollator(io.qt.core.QLocale.@NonNull Language locale) { this(new io.qt.core.QLocale(locale)); } /** *

Overloaded function for {@link #compare(java.nio.CharBuffer, java.nio.CharBuffer)}.

*/ @QtUninvokable public final int compare(char[] s1, int offsetOfS1, int len1, java.nio.@Nullable CharBuffer s2) { return compare(s1==null ? null : java.nio.CharBuffer.wrap(s1, offsetOfS1, len1), s2); } /** *

Overloaded function for {@link #compare(java.nio.CharBuffer, java.nio.CharBuffer)}.

*/ @QtUninvokable public final int compare(char[] s1, java.nio.@Nullable CharBuffer s2) { return compare(s1==null ? null : java.nio.CharBuffer.wrap(s1), s2); } /** *

Overloaded function for {@link #compare(java.nio.CharBuffer, java.nio.CharBuffer)}.

*/ @QtUninvokable public final int compare(java.nio.@Nullable CharBuffer s1, char[] s2, int offsetOfS2, int len2) { return compare(s1, s2==null ? null : java.nio.CharBuffer.wrap(s2, offsetOfS2, len2)); } /** *

Overloaded function for {@link #compare(java.nio.CharBuffer, java.nio.CharBuffer)}.

*/ @QtUninvokable public final int compare(char[] s1, int offsetOfS1, int len1, char[] s2, int offsetOfS2, int len2) { return compare(s1==null ? null : java.nio.CharBuffer.wrap(s1, offsetOfS1, len1), s2==null ? null : java.nio.CharBuffer.wrap(s2, offsetOfS2, len2)); } /** *

Overloaded function for {@link #compare(java.nio.CharBuffer, java.nio.CharBuffer)}.

*/ @QtUninvokable public final int compare(char[] s1, char[] s2, int offsetOfS2, int len2) { return compare(s1==null ? null : java.nio.CharBuffer.wrap(s1), s2==null ? null : java.nio.CharBuffer.wrap(s2, offsetOfS2, len2)); } /** *

Overloaded function for {@link #compare(java.nio.CharBuffer, java.nio.CharBuffer)}.

*/ @QtUninvokable public final int compare(java.nio.@Nullable CharBuffer s1, char[] s2) { return compare(s1, s2==null ? null : java.nio.CharBuffer.wrap(s2)); } /** *

Overloaded function for {@link #compare(java.nio.CharBuffer, java.nio.CharBuffer)}.

*/ @QtUninvokable public final int compare(char[] s1, int offsetOfS1, int len1, char[] s2) { return compare(s1==null ? null : java.nio.CharBuffer.wrap(s1, offsetOfS1, len1), s2==null ? null : java.nio.CharBuffer.wrap(s2)); } /** *

Overloaded function for {@link #compare(java.nio.CharBuffer, java.nio.CharBuffer)}.

*/ @QtUninvokable public final int compare(char[] s1, char[] s2) { return compare(s1==null ? null : java.nio.CharBuffer.wrap(s1), s2==null ? null : java.nio.CharBuffer.wrap(s2)); } /** *

Delegate for {@link #invoke(java.lang.CharSequence, java.lang.CharSequence)}.

*/ @QtUninvokable public final boolean isLessThan(java.lang.@NonNull CharSequence s1, java.lang.@NonNull CharSequence s2) { return invoke(s1, s2); } /** *

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

*/ @QtUninvokable public final boolean isLessThan(java.lang.@NonNull String s1, java.lang.@NonNull String s2) { return invoke(s1, s2); } /** *

Overloaded function for {@link #setLocale(io.qt.core.QLocale)}.

*/ @QtUninvokable public final void setLocale(io.qt.core.QLocale.@NonNull Language locale) { setLocale(new io.qt.core.QLocale(locale)); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy