Why Role < Role_Authority instead of Role != Role_Authority?

How can we use “<” with enums?
Why we are not writing Role != Role_Authority instead of Role < Role_Authority?

Can someone explain please how are we able to use “<” with enums and why not writing “!=” instead.

Hello! Enums are based on integer numbers and we can think of them as named integer numbers. Integer numbers are ordered, so in this sense our enum values are also ordered by that. When we compare two enum values we just compare two integers, that are hidden by their names. Some enums are created in a such way, that names themselves can have some order. For example, we can sort roles from the weakest to the strongest. That is the case why to use <> instead of ==