Relative Content

Tag Archive for javaenums

Looking to create a hierarchical enums

So basically I want to create a enum class that has a main type that will branch out to a sub type and each sub type has a second sub type. The best example for this would be Car. Assume there Honda and a Toyota based on the enum instantiation I want that specific sub type to be limited to, like wise the the second sub typ. for example Car: Honda – Model: Civic – trim: EX, Hybrid. If Toyota – Model: Camry – trim: Sport