From f480c2789457ff9fa78fedb1abf31e9e801be956 Mon Sep 17 00:00:00 2001 From: ZhouXY108 Date: Fri, 10 Mar 2023 18:04:59 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=B7=A5=E5=85=B7=E7=B1=BB?= =?UTF-8?q?=20Arrays2=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../zhouxy/plusone/commons/util/Arrays2.java | 37 +++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 src/main/java/xyz/zhouxy/plusone/commons/util/Arrays2.java diff --git a/src/main/java/xyz/zhouxy/plusone/commons/util/Arrays2.java b/src/main/java/xyz/zhouxy/plusone/commons/util/Arrays2.java new file mode 100644 index 0000000..829dbb2 --- /dev/null +++ b/src/main/java/xyz/zhouxy/plusone/commons/util/Arrays2.java @@ -0,0 +1,37 @@ +package xyz.zhouxy.plusone.commons.util; + +public abstract class Arrays2 { + + @SafeVarargs + public static T[] of(final T... values) { + return values; + } + + public static short[] of(final short... values) { + return values; + } + + public static int[] of(final int... values) { + return values; + } + + public static long[] of(final long... values) { + return values; + } + + public static byte[] of(final byte... values) { + return values; + } + + public static boolean[] of(final boolean... values) { + return values; + } + + public static char[] of(final char... values) { + return values; + } + + private Arrays2() { + throw new IllegalStateException("Utility class"); + } +}