I have two Enums as follows:
enum Connector {
AND, OR, XOR;
}
enum Component {
ACTIVITY
}
Now, I have a variable named follower in a class Event. This variable (follower) can have (and should have) value from either of the above two Enums.
So, What datatype should I give to the follower variable?
And you can make both enums implement the same interface, for example
Follower, and let the field be:But you’d better redesign the whole thing, it doesn’t feel right this way.