summaryrefslogtreecommitdiff
path: root/java/src/org/singinst/uf/model/SimpleColor.java
blob: 5a7e2e0b83c655b1c8dcf9367dc442b896ba1b93 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
package org.singinst.uf.model;

public enum SimpleColor {

	GREEN, BLACK, RED, LIGHT_GRAY;

	public abstract static class Visitor<T> {
		public T visit(SimpleColor color) {
			switch(color) {
				case GREEN: return visit_GREEN();
				case BLACK: return visit_BLACK();
				case RED: return visit_RED();
				case LIGHT_GRAY: return visit_LIGHT_GRAY();
				default: throw new RuntimeException();
			}				
		}
		
		public abstract T visit_GREEN();
		public abstract T visit_BLACK();
		public abstract T visit_RED();
		public abstract T visit_LIGHT_GRAY();
	}
}