public class Common extends Object
限定符和类型 | 字段和说明 |
---|---|
static String |
FILE_SEPARATOR |
static String |
LINE_SEPARATOR |
static String |
PATH_SEPARATOR |
构造器和说明 |
---|
Common() |
限定符和类型 | 方法和说明 |
---|---|
static <T> Set<T> |
arrayToSet(T[] array) |
static String |
byte2hex(byte[] b) |
static <K extends Serializable,V extends Serializable> |
copyMap(Map<K,V> org,
Map<K,V> target) |
static void |
copyStream(InputStream is,
OutputStream os) |
static void |
copyStream(InputStream is,
OutputStream os,
int blockSize,
boolean flushPerBlock,
int bps) |
static <T extends Serializable> |
deepCopy(T object) |
static <T> Set<T> |
difference(Set<T> org,
Set<T> todiv)
差集 org - todiv
|
static <T> int |
findInArray(T el,
T[] array) |
static File |
getFile(String fileName)
已过时。
|
static File |
getNewFile(String fileName) |
static URL |
getResource(String resource) |
static String |
getUUIDStr() |
static <T> boolean |
inArray(T el,
T[] array) |
static <T> int |
indexOf(T[] array,
T t) |
static <T> Set<T> |
intersection(Set<T> set1,
Set<T> set2)
交集
|
static boolean |
isBlank(String s) |
static <T> Set<T> |
join(Set<T> ary1,
Set<T> ary2)
并集 ary1 + ary2
|
static String |
native2AscII(String str) |
static String |
nullToStr(String str) |
static int |
random(int max) |
static int |
random(int min,
int max) |
static String |
sha1(String content) |
public static final String LINE_SEPARATOR
public static final String PATH_SEPARATOR
public static final String FILE_SEPARATOR
public static <T> Set<T> arrayToSet(T[] array)
public static String getUUIDStr()
public static <T> boolean inArray(T el, T[] array)
public static <T> int findInArray(T el, T[] array)
public static <T extends Serializable> T deepCopy(T object) throws IOException, ClassNotFoundException
public static int random(int max)
public static int random(int min, int max)
public static <K extends Serializable,V extends Serializable> void copyMap(Map<K,V> org, Map<K,V> target)
public static boolean isBlank(String s)
public static void copyStream(InputStream is, OutputStream os) throws IOException
IOException
public static void copyStream(InputStream is, OutputStream os, int blockSize, boolean flushPerBlock, int bps) throws IOException
IOException
public static String byte2hex(byte[] b)
public static <T> Set<T> intersection(Set<T> set1, Set<T> set2)
set1
- set2
- public static <T> Set<T> difference(Set<T> org, Set<T> todiv)
org
- todiv
- @Deprecated public static File getFile(String fileName) throws IOException
IOException
public static File getNewFile(String fileName) throws IOException
IOException
public static <T> int indexOf(T[] array, T t)
Copyright © 2017. All rights reserved.