📄 messageclass.java
字号:
/*
* JVending - J2ME MMS Client
* Copyright (C) 2004 Shane Isbell
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
package org.jvending.messaging.impl.mms;
/**
* @author Shane Isbell
* @version 1.0.0a
* @created 04/03/27
*/
class MessageClass {
static final int PERSONAL = 0;
static final int ADVERTISEMENT = 1;
static final int INFORMATIONAL = 2;
static final int AUTO = 3;
static String lookupMessageClass(int type) {
switch(type) {
case 0:
return "Personal";
case 1:
return "Advertisement";
case 2:
return "Informational";
case 3:
return "Auto";
default:
return "Illegal Value";
}
}
static int lookupMessageClass(String type) {
if(type.equals("Personal"))
return PERSONAL;
else if(type.equals("Advertisement"))
return ADVERTISEMENT;
else if(type.equals("Informational"))
return INFORMATIONAL;
else if(type.equals("Auto"))
return AUTO;
else
return -1;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -