Commit dfa94518 by stylefeng

格式规范化

parent 74f73802
...@@ -8,11 +8,11 @@ package com.stylefeng.guns.core.page; ...@@ -8,11 +8,11 @@ package com.stylefeng.guns.core.page;
*/ */
public class PageBT { public class PageBT {
private int limit; // 每页显示个数 private int limit; // 每页显示个数
private int offset; // 查询的偏移量(查询的页数 = offset/limit + 1) private int offset; // 查询的偏移量(查询的页数 = offset/limit + 1)
private String order; // 排序方式 private String order; // 排序方式
public PageBT() { public PageBT() {
......
...@@ -67,7 +67,6 @@ public class ImgQrTool { ...@@ -67,7 +67,6 @@ public class ImgQrTool {
* @param width 宽度 * @param width 宽度
* @param height 高度 * @param height 高度
* @param srcImagePath 被镶嵌的图片的地址 * @param srcImagePath 被镶嵌的图片的地址
* @param destImagePath 生成二维码图片的地址
* @author fengshuonan * @author fengshuonan
* @since 2.3.0 * @since 2.3.0
*/ */
......
...@@ -5,28 +5,34 @@ import java.util.Map; ...@@ -5,28 +5,34 @@ import java.util.Map;
/** /**
* 基本变量类型的枚举 * 基本变量类型的枚举
*
* @author xiaoleilu * @author xiaoleilu
*/ */
public enum BasicType { public enum BasicType {
BYTE, SHORT, INT, INTEGER, LONG, DOUBLE, FLOAT, BOOLEAN, CHAR, CHARACTER, STRING; BYTE, SHORT, INT, INTEGER, LONG, DOUBLE, FLOAT, BOOLEAN, CHAR, CHARACTER, STRING;
/** 原始类型为Key,包装类型为Value,例如: int.class -> Integer.class. */
public static final Map<Class<?>, Class<?>> wrapperPrimitiveMap = new HashMap<Class<?>, Class<?>>(8);
/** 包装类型为Key,原始类型为Value,例如: Integer.class -> int.class. */
public static final Map<Class<?>, Class<?>> primitiveWrapperMap = new HashMap<Class<?>, Class<?>>(8);
static {
wrapperPrimitiveMap.put(Boolean.class, boolean.class);
wrapperPrimitiveMap.put(Byte.class, byte.class);
wrapperPrimitiveMap.put(Character.class, char.class);
wrapperPrimitiveMap.put(Double.class, double.class);
wrapperPrimitiveMap.put(Float.class, float.class);
wrapperPrimitiveMap.put(Integer.class, int.class);
wrapperPrimitiveMap.put(Long.class, long.class);
wrapperPrimitiveMap.put(Short.class, short.class);
for (Map.Entry<Class<?>, Class<?>> entry : wrapperPrimitiveMap.entrySet()) { /**
primitiveWrapperMap.put(entry.getValue(), entry.getKey()); * 原始类型为Key,包装类型为Value,例如: int.class -> Integer.class.
} */
} public static final Map<Class<?>, Class<?>> wrapperPrimitiveMap = new HashMap<Class<?>, Class<?>>(8);
/**
* 包装类型为Key,原始类型为Value,例如: Integer.class -> int.class.
*/
public static final Map<Class<?>, Class<?>> primitiveWrapperMap = new HashMap<Class<?>, Class<?>>(8);
static {
wrapperPrimitiveMap.put(Boolean.class, boolean.class);
wrapperPrimitiveMap.put(Byte.class, byte.class);
wrapperPrimitiveMap.put(Character.class, char.class);
wrapperPrimitiveMap.put(Double.class, double.class);
wrapperPrimitiveMap.put(Float.class, float.class);
wrapperPrimitiveMap.put(Integer.class, int.class);
wrapperPrimitiveMap.put(Long.class, long.class);
wrapperPrimitiveMap.put(Short.class, short.class);
for (Map.Entry<Class<?>, Class<?>> entry : wrapperPrimitiveMap.entrySet()) {
primitiveWrapperMap.put(entry.getValue(), entry.getKey());
}
}
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment