/protocols/ss7/map/map-api/src/main/java/org/mobicents/protocols/ss7/map/api/primitives/AlertingCategory.java
Java | 57 lines | 26 code | 6 blank | 25 comment | 1 complexity | 3df0e24f4b950aa09e9fd10065099b86 MD5 | raw file
1/* 2 * JBoss, Home of Professional Open Source 3 * Copyright 2011, Red Hat, Inc. and/or its affiliates, and individual 4 * contributors as indicated by the @authors tag. All rights reserved. 5 * See the copyright.txt in the distribution for a full listing 6 * of individual contributors. 7 * 8 * This copyrighted material is made available to anyone wishing to use, 9 * modify, copy, or redistribute it subject to the terms and conditions 10 * of the GNU General Public License, v. 2.0. 11 * 12 * This program is distributed in the hope that it will be useful, 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 * General Public License for more details. 16 * 17 * You should have received a copy of the GNU General Public License, 18 * v. 2.0 along with this distribution; if not, write to the Free 19 * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 20 * MA 02110-1301, USA. 21 */ 22package org.mobicents.protocols.ss7.map.api.primitives; 23 24/** 25 * @author amit bhayani 26 * 27 */ 28public enum AlertingCategory { 29 Category1((byte)4), Category2((byte)5), Category3((byte)6), Category4((byte)7), Category5((byte)8); 30 31 private final byte category; 32 33 private AlertingCategory(byte category) { 34 this.category = category; 35 } 36 37 public byte getCategory() { 38 return this.category; 39 } 40 41 public static AlertingCategory getInstance(byte data) { 42 switch (data) { 43 case 4: 44 return Category1; 45 case 5: 46 return Category2; 47 case 6: 48 return Category3; 49 case 7: 50 return Category4; 51 case 8: 52 return Category5; 53 } 54 55 return null; 56 } 57}