If I have an Enum
as a helper in a Java class, is there any way to refer to that Enum
outside of the class it's helping?
Basically, what I have is this:
class Account extends MyClass {
HashMap<Property, String> property = new HashMap<Property, String>();
public Account() {
}
public enum Property {
USERID,
PASSWORD;
}
}
I want to be able to access the Property
enum outside of the Account
class.
The reason I want to do this is because this is a subclass of a another, and I want to be able to access the properties of a given subclass without referring to a unique enum name (i.e.: without referring to each one as, say, AccountProperty
or ResearchProperty
or TaskProperty
etc).