From 5ce86b6a8a596e23a1478978186ee58201ff73ad Mon Sep 17 00:00:00 2001 From: tangmingyou <234767776@qq.com> Date: Sun, 24 Apr 2022 00:34:45 +0800 Subject: [PATCH] collects --- .../net/sopod/soim/common/util/Collects.java | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 im-common/src/main/java/net/sopod/soim/common/util/Collects.java diff --git a/im-common/src/main/java/net/sopod/soim/common/util/Collects.java b/im-common/src/main/java/net/sopod/soim/common/util/Collects.java new file mode 100644 index 0000000..4738e61 --- /dev/null +++ b/im-common/src/main/java/net/sopod/soim/common/util/Collects.java @@ -0,0 +1,23 @@ +package net.sopod.soim.common.util; + +/** + * Collects + * + * @author tmy + * @date 2022-04-22 10:17 + */ +public class Collects { + + /** + * 数组翻转 + */ + public static long[] revers(long[] arr) { + for (int i = 0, j = arr.length - 1; i < j; i++, j--) { + long temp = arr[i]; + arr[i] = arr[j]; + arr[j] = temp; + } + return arr; + } + +}