- All Superinterfaces:
QtAbstractEnumerator
- All Known Implementing Classes:
QCborSimpleType
,QCborStreamReader.Type
,QDtlsError
,QKeyFrame.InterpolationType
,QMetaType.GenericByteEnumerator
,QNetworkAddressEntry.DnsEligibilityStatus
,QtJambiInternal.Ownership
public interface QtByteEnumerator extends QtAbstractEnumerator
The QtEnumerator interface servers as a base for all qint8 enum classes.
Its sole purpose is to unify the access to the integer
value of enumerators and flags using the value() method.
If you manually implement this class, your implementation must contain a method
with the following signature:
public static T resolve(byte value);
where T is your subclass. This should return the enum value corresponding to the
specified int value.
-
Method Summary
Modifier and Type Method Description static <E extends QtByteEnumerator>
Comparator<E>comparator()
Creates a comparator for enumeration valuesClass<? extends QtByteEnumerator>
getDeclaringClass()
String
name()
int
ordinal()
default byte
value()
This function should return a byte value for the enum values of the enumeration that implements this interface.
-
Method Details
-
value
default byte value()This function should return a byte value for the enum values of the enumeration that implements this interface. -
ordinal
int ordinal()- Specified by:
ordinal
in interfaceQtAbstractEnumerator
- Returns:
- the ordinal of this enumeration constant
- See Also:
Enum.ordinal()
-
name
String name()- Specified by:
name
in interfaceQtAbstractEnumerator
- Returns:
- the name of this enum constant
- See Also:
Enum.name()
-
getDeclaringClass
Class<? extends QtByteEnumerator> getDeclaringClass()- Specified by:
getDeclaringClass
in interfaceQtAbstractEnumerator
- Returns:
- the Class object corresponding to this enum constant's enum type
- See Also:
Enum.getDeclaringClass()
-
comparator
Creates a comparator for enumeration values- Type Parameters:
E
-- Returns:
- comparator
-