本文整理了Java中com.strobel.core.ArrayUtilities.insert()
方法的一些代码示例,展示了ArrayUtilities.insert()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ArrayUtilities.insert()
方法的具体详情如下:
包路径:com.strobel.core.ArrayUtilities
类名称:ArrayUtilities
方法名:insert
暂无
代码示例来源:origin: org.jboss.windup.decompiler.procyon/procyon-core
@SafeVarargs
public static <T> T[] prepend(final T[] array, final T... values) {
if (array == null) {
if (values == null || values.length == 0) {
throw new IllegalArgumentException("At least one value must be specified if 'array' is null.");
}
final T[] newArray = (T[])Array.newInstance(values.getClass().getComponentType(), values.length);
System.arraycopy(values, 0, newArray, 0, values.length);
return newArray;
}
return insert(array, 0, values);
}
代码示例来源:origin: org.bitbucket.mstrobel/procyon-core
public static float[] prepend(final float[] array, final float value) {
if (isNullOrEmpty(array)) {
return new float[] { value };
}
return insert(array, 0, value);
}
代码示例来源:origin: org.jboss.windup.decompiler.procyon/windup-procyon-core
public static <T> T[] append(final T[] array, final T value) {
if (array == null) {
if (value == null) {
throw new IllegalArgumentException("At least one value must be specified if 'array' is null.");
}
final T[] newArray = (T[])Array.newInstance(value.getClass(), 1);
newArray[0] = value;
return newArray;
}
return insert(array, VerifyArgument.notNull(array, "array").length, value);
}
代码示例来源:origin: org.jboss.windup.decompiler.procyon/windup-procyon-core
public static float[] prepend(final float[] array, final float value) {
if (isNullOrEmpty(array)) {
return new float[] { value };
}
return insert(array, 0, value);
}
代码示例来源:origin: org.jboss.windup.decompiler.procyon/procyon-core
public static char[] prepend(final char[] array, final char value) {
if (isNullOrEmpty(array)) {
return new char[] { value };
}
return insert(array, 0, value);
}
代码示例来源:origin: org.jboss.windup.decompiler.procyon/procyon-core
public static int[] prepend(final int[] array, final int value) {
if (isNullOrEmpty(array)) {
return new int[] { value };
}
return insert(array, 0, value);
}
代码示例来源:origin: org.bitbucket.mstrobel/procyon-core
public static byte[] prepend(final byte[] array, final byte... values) {
if (isNullOrEmpty(array)) {
if (isNullOrEmpty(values)) {
return values;
}
return Arrays.copyOf(values, values.length);
}
return insert(array, 0, values);
}
代码示例来源:origin: org.bitbucket.mstrobel/procyon-core
public static short[] prepend(final short[] array, final short... values) {
if (isNullOrEmpty(array)) {
if (isNullOrEmpty(values)) {
return values;
}
return Arrays.copyOf(values, values.length);
}
return insert(array, 0, values);
}
代码示例来源:origin: org.bitbucket.mstrobel/procyon-core
public static long[] prepend(final long[] array, final long... values) {
if (isNullOrEmpty(array)) {
if (isNullOrEmpty(values)) {
return values;
}
return Arrays.copyOf(values, values.length);
}
return insert(array, 0, values);
}
代码示例来源:origin: org.bitbucket.mstrobel/procyon-core
public static float[] prepend(final float[] array, final float... values) {
if (isNullOrEmpty(array)) {
if (isNullOrEmpty(values)) {
return values;
}
return Arrays.copyOf(values, values.length);
}
return insert(array, 0, values);
}
代码示例来源:origin: org.jboss.windup.decompiler.procyon/windup-procyon-core
public static float[] prepend(final float[] array, final float... values) {
if (isNullOrEmpty(array)) {
if (isNullOrEmpty(values)) {
return values;
}
return Arrays.copyOf(values, values.length);
}
return insert(array, 0, values);
}
代码示例来源:origin: org.jboss.windup.decompiler.procyon/windup-procyon-core
public static double[] prepend(final double[] array, final double... values) {
if (isNullOrEmpty(array)) {
if (isNullOrEmpty(values)) {
return values;
}
return Arrays.copyOf(values, values.length);
}
return insert(array, 0, values);
}
代码示例来源:origin: org.bitbucket.mstrobel/procyon-core
public static long[] append(final long[] array, final long value) {
if (isNullOrEmpty(array)) {
return new long[] { value };
}
return insert(array, VerifyArgument.notNull(array, "array").length, value);
}
代码示例来源:origin: org.jboss.windup.decompiler.procyon/procyon-core
public static long[] append(final long[] array, final long value) {
if (isNullOrEmpty(array)) {
return new long[] { value };
}
return insert(array, VerifyArgument.notNull(array, "array").length, value);
}
代码示例来源:origin: org.bitbucket.mstrobel/procyon-core
public static boolean[] append(final boolean[] array, final boolean... values) {
if (isNullOrEmpty(array)) {
if (isNullOrEmpty(values)) {
return values;
}
return Arrays.copyOf(values, values.length);
}
return insert(array, VerifyArgument.notNull(array, "array").length, values);
}
代码示例来源:origin: org.jboss.windup.decompiler.procyon/windup-procyon-core
public static char[] append(final char[] array, final char... values) {
if (isNullOrEmpty(array)) {
if (isNullOrEmpty(values)) {
return values;
}
return Arrays.copyOf(values, values.length);
}
return insert(array, VerifyArgument.notNull(array, "array").length, values);
}
代码示例来源:origin: org.jboss.windup.decompiler.procyon/windup-procyon-core
public static int[] append(final int[] array, final int... values) {
if (isNullOrEmpty(array)) {
if (isNullOrEmpty(values)) {
return values;
}
return Arrays.copyOf(values, values.length);
}
return insert(array, VerifyArgument.notNull(array, "array").length, values);
}
代码示例来源:origin: org.jboss.windup.decompiler.procyon/windup-procyon-core
public static float[] append(final float[] array, final float... values) {
if (isNullOrEmpty(array)) {
if (isNullOrEmpty(values)) {
return values;
}
return Arrays.copyOf(values, values.length);
}
return insert(array, VerifyArgument.notNull(array, "array").length, values);
}
代码示例来源:origin: org.jboss.windup.decompiler.procyon/windup-procyon-core
public static double[] append(final double[] array, final double... values) {
if (isNullOrEmpty(array)) {
if (isNullOrEmpty(values)) {
return values;
}
return Arrays.copyOf(values, values.length);
}
return insert(array, VerifyArgument.notNull(array, "array").length, values);
}
代码示例来源:origin: org.jboss.windup.decompiler.procyon/procyon-core
public static int[] append(final int[] array, final int... values) {
if (isNullOrEmpty(array)) {
if (isNullOrEmpty(values)) {
return values;
}
return Arrays.copyOf(values, values.length);
}
return insert(array, VerifyArgument.notNull(array, "array").length, values);
}
内容来源于网络,如有侵权,请联系作者删除!