去重

@param arrays 数组

@return 去重后的数组
325657
public static String[] unique(String[] arrays) {
        List<String> list = new ArrayList<>(arrays.length);
        for (String arr : arrays) {
            if (!list.contains(arr)) {
                list.add(arr);
            }
        }
        String[] res = new String[list.size()];
        int i = 0;
        for (String arr : list) {
            res[i++] = arr;
        }
        return res;
    }
61994
public static <T, J extends Convertable<T>> T[] convertToArray(J[] array) {
        return toArray(convert(array));
    }
1345983
@SuppressWarnings("unchecked")
    public static List<Byte> getAt(byte[] array, Collection indices) {
        return primitiveArrayGet(array, indices);
    }
698691
function unzip (arrays) {
  var result = []
  var index = 0
  var len = XEUtils.max(arrays, function (item) {
    return item.length || 0
  }).length
  for (; index < len; index++) {
    result.push(arrayMap(arrays, index))
  }
  return result
}
998692
public static String arrayToPath(final String[] array) {
        if (array == null) {
            return "";
        }

        return Joiner.on(",").skipNulls().join(array);
    }
515078
public static String[][] invert(final String[][] array) {
        final String[][] newarray = new String[array.length][2];
        for(int i = 0; i<array.length; i++) {
            newarray[i][0] = array[i][1];
            newarray[i][1] = array[i][0];
        }
        return newarray;
    }
763726
public static <T> Level0ArrayOperator<Integer[],Integer> onArrayFor(final Integer... elements) {
        return onArrayOf(Types.INTEGER, VarArgsUtil.asRequiredObjectArray(elements));
    }
266018
public static function add(array ...$arrays): array
    {
        self::checkArrayLengths($arrays);

        $number_of_arrays = count($arrays);
        $length_of_arrays = count($arrays[0]);
        $sums             = array_fill(0, $length_of_arrays, 0);

        for ($i = 0; $i < $length_of_arrays; $i++) {
            for ($j = 0; $j < $number_of_arrays; $j++) {
                $sums[$i] += $arrays[$j][$i];
            }
        }

        return $sums;
    }
142851
function interleave(...arrays) {
  var more = true;
  var n = 0;
  var result = [];
  while (more) {
    more = false;
    for (var array of arrays) {
      if (n >= array.length) continue;
      result.push(array[n]);
      more = true;
    }
    n++;
  }
  return result;
}
1215029
public static <T> List<T> arrayToList(T[] array) {
        List<T> list = null;
        if (array != null) {
            list = new ArrayList<>();
            for (T e : array) {
                list.add(e);
            }
        }
        return list;
    }
803476
public static function merge(array ...$arrays): array
    {
        $res = array_shift($arrays);
        while (!empty($arrays)) {
            foreach (array_shift($arrays) as $key => $value) {
                if (is_int($key)) {
                    if (array_key_exists($key, $res)) {
                        $res[] = $value;
                    } else {
                        $res[$key] = $value;
                    }
                } elseif (
                    is_array($value)
                    && isset($res[$key])
                    && is_array($res[$key])
                ) {
                    $res[$key] = static::merge($res[$key], $value);
                } else {
                    $res[$key] = $value;
                }
            }
        }
        return $res;
    }
1132586
public static Iterator<Object> getKeys(Object[] array)
    {
        if (array == null)
        {
            return null;
        }
        ArrayList<Object> keyList = new ArrayList<Object>();
        int i = array.length - 2;
        while (i >= 0)
        {
            keyList.add(array[i]);
            i = i - 2;
        }
        return keyList.iterator();
    }
649727
public static List<Integer> asList(int[] array) {
    List<Integer> l = new ArrayList<Integer>();
    for (int i : array) {
      l.add(i);
    }
    return l;
  }
577306
public static String[] toStringArray(final Object array) {
        final int length = Array.getLength(array);
        final String[] result = new String[length];
        for (int i = 0; i < length; i++) {
            result[i] = Array.get(array, i).toString();
        }
        return result;
    }
914408
public static <T, J extends Convertable<T>> ArrayList<T> convert(J[] array) {
        return convert(array == null ? null : Arrays.asList(array));
    }
451792
@SuppressWarnings("unchecked")
    public static List<Float> getAt(float[] array, Collection indices) {
        return primitiveArrayGet(array, indices);
    }
492768
public static <T> List<T> asArrayList(T[] values) {
    ArrayList<T> result = new ArrayList<T>();
    Collections.addAll(result, values);

    return result;
  }