App

- Main Page
- Related Pages
- Namespaces
- Classes
- Files

- File List
- File Members

ChannelCount.java
Go to the documentation of this file.
1 package mhr.appcore.bitmap;
2
6 public enum ChannelCount {
7 INVALID_COUNT(0),
8 SINGLE_CHANNEL(1),
9 FOUR_CHANNEL(4);
10
11 private final int count;
12
17 private ChannelCount(int count) {
18 this.count = count;
19 }
20
25 public int getCount() {
26 return count;
27 }
28
34 public static ChannelCount fromCount(int count) {
35 switch (count) {
36 case 1:
37 return ChannelCount.SINGLE_CHANNEL;
38 case 4:
39 return ChannelCount.FOUR_CHANNEL;
40 default:
41 return ChannelCount.INVALID_COUNT;
42 }
43 }
44 }