
io.qt.internal.PropertyAttributes Maven / Gradle / Ivy
package io.qt.internal;
import io.qt.*;
/**
* @hidden
*/
public final class PropertyAttributes extends QFlags<@NonNull PropertyFlags> implements Comparable<@NonNull PropertyAttributes> {
private static final long serialVersionUID = 0x8dcb5758239e30bcL;
static {
QtJambi_LibraryUtilities.initialize();
}
/**
* Creates a new PropertyAttributes where the flags in args
are set.
* @param args enum entries
*/
public PropertyAttributes(@Nullable PropertyFlags @NonNull... args){
super(args);
}
/**
* Creates a new PropertyAttributes with given value
.
* @param value
*/
public PropertyAttributes(int value) {
super(value);
}
/**
* Combines this flags with enum entry.
* @param e enum entry
* @return new PropertyAttributes
*/
@Override
public final @NonNull PropertyAttributes combined(@StrictNonNull PropertyFlags e){
return new PropertyAttributes(value() | e.value());
}
/**
* Sets the flag e
* @param e enum entry
* @return this
*/
public final @NonNull PropertyAttributes setFlag(@Nullable PropertyFlags e){
return setFlag(e, true);
}
/**
* Sets or clears the flag flag
* @param e enum entry
* @param on set (true) or clear (false)
* @return this
*/
public final @NonNull PropertyAttributes setFlag(@Nullable PropertyFlags e, boolean on){
if (e!=null) {
if (on) {
setValue(value() | e.value());
}else {
setValue(value() & ~e.value());
}
}
return this;
}
/**
* Returns an array of flag objects represented by this PropertyAttributes.
* @return array of enum entries
*/
@Override
public final @NonNull PropertyFlags @NonNull[] flags(){
return super.flags(PropertyFlags.values());
}
/**
* {@inheritDoc}
*/
@Override
public final @NonNull PropertyAttributes clone(){
return new PropertyAttributes(value());
}
/**
* Compares this flag with the specified flag for order.
* {@inheritDoc}
*/
@Override
public final int compareTo(@StrictNonNull PropertyAttributes other){
return Integer.compare(value(), other.value());
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy