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

io.qt.internal.EnumFlags Maven / Gradle / Ivy

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

import io.qt.*;

/**
 * 

Java wrapper for Qt enum EnumFlags

* @hidden */ public enum EnumFlags implements QtFlagEnumerator { /** *

Representing EnumIsFlag

*/ EnumIsFlag(1), /** *

Representing EnumIsScoped

*/ EnumIsScoped(2); static { QtJambi_LibraryUtilities.initialize(); } private EnumFlags(int value) { this.value = value; } /** * {@inheritDoc} */ @Override public int value() { return value; } /** * Create a QFlags of the enum entry. * @return QFlags */ @Override public @NonNull EnumAttributes asFlags() { return new EnumAttributes(value); } /** * Combines this entry with other enum entry. * @param e enum entry * @return new flag */ public @NonNull EnumAttributes combined(@NonNull EnumFlags e) { return asFlags().setFlag(e, true); } /** * Excludes other enum entry from a flag of this entry. * @param e enum entry * @return new flag */ public @NonNull EnumAttributes cleared(@NonNull EnumFlags e) { return asFlags().setFlag(e, false); } /** * Creates a new {@link EnumAttributes} from the entries. * @param values entries * @return new flag */ public static @NonNull EnumAttributes flags(@Nullable EnumFlags @NonNull... values) { return new EnumAttributes(values); } /** * Returns the corresponding enum entry for the given value. * @param value * @return enum entry */ public static @NonNull EnumFlags resolve(int value) { switch (value) { case 1: return EnumIsFlag; case 2: return EnumIsScoped; default: throw new QNoSuchEnumValueException(value); } } private final int value; }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy