Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package versionenif;
- enum Parameter {NAME, QUALITY, STANDART;}
- enum Type {NUMERICAL, CATEGORIAL, STRING ;}
- enum Priority{SECOND, FIRST;}
- public class enumif_v2 {
- Parameter parameter;
- Type type;
- Priority priority;
- int nb;
- String STATE = "";
- public enumif_v2(Parameter parameter, Type type, Priority priority) {
- this.parameter = parameter;
- this.type = type;
- this.priority = priority;
- }
- public void SwitchZustand(Parameter parameter, Type type, Priority priority) {
- if(parameter == Parameter.NAME) {
- if(type == Type.NUMERICAL) {
- parameter = Parameter.STANDART;
- if(priority == Priority.FIRST) {
- type = Type.CATEGORIAL;
- }
- if(priority == Priority.SECOND) {
- type = Type.STRING;
- }
- }
- if(type == Type.CATEGORIAL) {
- parameter = Parameter.QUALITY;
- }
- if(type == Type.STRING) {
- parameter = Parameter.STANDART;
- if(priority == Priority.FIRST) {
- type = Type.CATEGORIAL;
- if(STATE == "ROUND")
- MagicThings(nb);
- }
- if(priority == Priority.SECOND) {
- type = Type.STRING;
- }
- }
- if(parameter == Parameter.QUALITY) {
- if(type == Type.NUMERICAL) {
- if(STATE == "TRIANGLE")
- DoMagicThings(nb);
- if(priority == Priority.FIRST) {
- type = Type.STRING;
- if(STATE == "RECTANGLE")
- DoMagicThings(nb);
- }
- }
- }
- }
- }
- public void MagicThings(int parameter) {
- //do some magic
- }
- public void DoMagicThings(int parameter) {
- //do some magic
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement