paramutil.java

来自「是一个Bug系统」· Java 代码 · 共 38 行

JAVA
38
字号
/*
 * 创建日期 2006-2-25
 *
 */
package com.runwit.common.util;

/**
 * @date 2006-2-25 @author user
 *
 */
public class ParamUtil {
    
    public static String getParameter(String s) {
        return s == null ? "" : s;
    }
    
    public static int stringValue(String s, int defaultRef) {
        try {
            
            return Integer.parseInt(s);
            
        }catch(Exception ex) {
            return defaultRef;
        }
    }
    
    public static int stringValue(String s) {
        return ParamUtil.stringValue(s, 0);
    }
    
    public static String[] getParameter(String s[]){
    	
      return s == null ? new String[0]:s;
    }
    

}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?