Subversion Repositories SmartDukaan

Rev

Rev 21719 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
22124 ashik.ali 1
package com.spice.profitmandi.common.enumuration;
21545 ashik.ali 2
 
3
public enum ContentType{
4
	PDF(0),
5
	JPEG(1),
6
	PNG(2);
7
 
8
	private final int value;
9
 
10
	private ContentType(int value) {
11
		this.value = value;
12
	}
13
 
14
	public int getValue() {
15
		return value;
16
	}
17
 
18
	public static ContentType findByValue(int value) { 
19
		switch (value) {
20
		case 0:
21
			return PDF;
22
		case 1:
23
			return JPEG;
24
		case 2:
25
			return PNG;
26
		default:
27
			return null;
28
		}
29
	}
30
}