Skip to content
This repository was archived by the owner on Jan 24, 2019. It is now read-only.

Commit 112d258

Browse files
committed
更新
1 parent 4b57845 commit 112d258

File tree

3 files changed

+12
-12
lines changed

3 files changed

+12
-12
lines changed

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -287,16 +287,10 @@ String msg = Dialogs.showInputDialog("title", "header", "content", "default valu
287287
| extractInt | 从字符串中提取数字并转换为Integer |
288288
| extractDigit | 从字符串中提取出数字,包括最后一个“.”号 |
289289
| maxLengthString | 返回多个字符串中长度最长的字符串 |
290-
| concatArrays | 合并多个数组 |
291-
| getCurrentMonth() | 获取当前月份 |
292290
| copyToClipboard | 复制字符串至系统剪贴板 |
293291
| openLink | 使用系统默认的浏览器打开超链接 |
294292
| openFile | 使用系统默认的方式打开文件 |
295-
| getDay | 获取日期 |
296-
| getMonth | 获取月份 |
297-
| getYear | 获取年份 |
298293
| getMaxValue | 从多个数字中获取最大值 |
299-
| mergeSortedArrays | 将两个已经排好序(同序)的数组合并一个有序数组 |
300294
|getCurrentOS()|获取当前系统名称|
301295

302296
**11. `com.zhazhapan.util.ArrayUtils`**
@@ -311,6 +305,8 @@ String msg = Dialogs.showInputDialog("title", "header", "content", "default valu
311305
|insertSort|插入排序|
312306
|bubbleSort|冒泡排序|
313307
|unique|数组去重|
308+
| concatArrays | 合并多个数组 |
309+
| mergeSortedArrays | 将两个已经排好序(同序)的数组合并一个有序数组 |
314310

315311
**12. `com.zhazhapan.util.DateUtils`**
316312

@@ -324,6 +320,10 @@ String msg = Dialogs.showInputDialog("title", "header", "content", "default valu
324320
|addYear|某个日期后推多少个年|
325321
|addMonth|某个日期后推多少个月|
326322
|addDay|某个日期后推多少个天|
323+
| getCurrentMonth() | 获取当前月份 |
324+
| getDay | 获取日期 |
325+
| getMonth | 获取月份 |
326+
| getYear | 获取年份 |
327327

328328
**13. 发送邮件**
329329

src/main/java/com/zhazhapan/util/FileExecutor.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -400,7 +400,7 @@ public static void splitFile(String filePath, long[] splitPoints, String storage
400400
* @throws IOException 异常
401401
*/
402402
public static void splitFile(File file, long[] splitPoints, String storageFolder) throws IOException {
403-
splitPoints = Utils.concatArrays(new long[]{0}, splitPoints, new long[]{file.length()});
403+
splitPoints = ArrayUtils.concatArrays(new long[]{0}, splitPoints, new long[]{file.length()});
404404
String[] fileName = file.getName().split("\\.", 2);
405405
storageFolder += ValueConsts.SEPARATOR;
406406
logger.info("start to split file '" + file.getAbsolutePath() + "'");
@@ -556,7 +556,7 @@ public static void mergeFiles(String[] filePath, String destinationFilePath, Str
556556
*/
557557
public static void mergeFiles(File[] files, File destinationFile, String[] filterRegex) throws IOException {
558558
if (filterRegex.length < files.length) {
559-
filterRegex = Utils.concatArrays(filterRegex, new String[files.length - filterRegex.length]);
559+
filterRegex = ArrayUtils.concatArrays(filterRegex, new String[files.length - filterRegex.length]);
560560
}
561561
createNewFile(destinationFile);
562562
int i = 0;

src/test/java/com/zhazhapan/util/UtilsTest.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ public class UtilsTest {
1717

1818
@Test
1919
public void testGetCurrentDate() {
20-
System.out.println(Utils.getCurrentMonth());
20+
System.out.println(DateUtils.getCurrentMonth());
2121
}
2222

2323
@Test
@@ -44,7 +44,7 @@ public void testNumberExtract() {
4444

4545
@Test
4646
public void testConcatArrays() {
47-
int[] nums = Utils.concatArrays(test1, test2, test4, test3);
47+
int[] nums = ArrayUtils.concatArrays(test1, test2, test4, test3);
4848
for (int i : nums) {
4949
System.out.print(i + " ");
5050
}
@@ -58,7 +58,7 @@ public void testGetMaxValue() {
5858

5959
@Test
6060
public void testMergeSortedArrays() {
61-
assertTrue(Checker.isSorted(Utils.mergeSortedArrays(test1, test2, true)));
62-
assertTrue(Checker.isSorted(Utils.mergeSortedArrays(test4, test3)));
61+
assertTrue(Checker.isSorted(ArrayUtils.mergeSortedArrays(test1, test2, true)));
62+
assertTrue(Checker.isSorted(ArrayUtils.mergeSortedArrays(test4, test3)));
6363
}
6464
}

0 commit comments

Comments
 (0)