Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Optimize] 移除无用的文件。移除对于 paradise-common 的依赖。
- Loading branch information
Showing
28 changed files
with
131 additions
and
1,579 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
src/main/java/com/github/houbb/opencc4j/core/impl/CharSegment.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
src/main/java/com/github/houbb/opencc4j/util/CollectionUtil.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package com.github.houbb.opencc4j.util; | ||
|
||
import java.util.Collection; | ||
|
||
/** | ||
* 集合工具类 | ||
* @author binbin.hou | ||
* @date 2019/4/30 | ||
* @since 1.0.3 | ||
*/ | ||
public final class CollectionUtil { | ||
|
||
private CollectionUtil(){} | ||
|
||
/** | ||
* 集合是否为空 | ||
* @param collection 集合 | ||
* @return 是否 | ||
*/ | ||
public static boolean isEmpty(final Collection collection) { | ||
return null == collection || collection.isEmpty(); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
src/main/java/com/github/houbb/opencc4j/util/ObjectUtil.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
package com.github.houbb.opencc4j.util; | ||
|
||
/** | ||
* 对象工具类 | ||
* @author binbin.hou | ||
* @date 2019/4/30 | ||
* @since 1.0.3 | ||
*/ | ||
public final class ObjectUtil { | ||
|
||
private ObjectUtil(){} | ||
|
||
/** | ||
* 是否为 null | ||
* @param object 对象 | ||
* @return 是否 | ||
*/ | ||
public static boolean isNull(final Object object) { | ||
return null == object; | ||
} | ||
|
||
/** | ||
* 是否为不 null | ||
* @param object 对象 | ||
* @return 是否 | ||
*/ | ||
public static boolean isNotNull(final Object object) { | ||
return !isNull(object); | ||
} | ||
} |
56 changes: 56 additions & 0 deletions
56
src/main/java/com/github/houbb/opencc4j/util/StringUtil.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
package com.github.houbb.opencc4j.util; | ||
|
||
/** | ||
* 字符串工具类 | ||
* 1. 为了移除外部依赖。 | ||
* @author binbin.hou | ||
* @date 2019/4/30 | ||
* @since 1.0.3 | ||
*/ | ||
public final class StringUtil { | ||
|
||
private StringUtil(){} | ||
|
||
/** | ||
* 空字符串 | ||
*/ | ||
public static final String EMPTY = ""; | ||
|
||
/** | ||
* 空格 | ||
*/ | ||
public static final String BLANK = " "; | ||
|
||
/** | ||
* 是否为空 | ||
* @param string 字符串 | ||
* @return 是否为空 | ||
*/ | ||
public static boolean isEmpty(String string) { | ||
return null == string || EMPTY.equals(string); | ||
} | ||
|
||
/** | ||
* 是否不为空 | ||
* @param string 字符串 | ||
* @return 是否为空 | ||
*/ | ||
public static boolean isNotEmpty(String string) { | ||
return !isEmpty(string); | ||
} | ||
|
||
/** | ||
* 按照任意空格拆分 | ||
* @param string 字符串 | ||
* @return 拆分后的数组 | ||
*/ | ||
public static String[] splitByAnyBlank(String string) { | ||
if (isEmpty(string)) { | ||
return new String[0]; | ||
} else { | ||
String pattern = "\\s+"; | ||
return string.split(pattern); | ||
} | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.