合并多部词典

@param pathArray
@return
760089
public static DictionaryMaker combine(String... pathArray)
    {
        DictionaryMaker dictionaryMaker = new DictionaryMaker();
        for (String path : pathArray)
        {
            logger.warning("正在处理" + path);
            dictionaryMaker.addAll(DictionaryMaker.loadAsItemList(path));
        }
        return dictionaryMaker;
    }
1033173
private static String mergePaths(String path1, String path2)
  {
    return path1 + (path1.endsWith(Path.SEPARATOR) ? "" : Path.SEPARATOR) + path2;
  }
719400
public static String byteArray2String(byte[][] pathComponents) {
    if (pathComponents.length == 0)
      return "";
    if (pathComponents.length == 1 && pathComponents[0].length == 0) {
      return Path.SEPARATOR;
    }

    StringBuilder result = new StringBuilder();
    for (int i = 0; i < pathComponents.length; i++) {
      String converted = bytes2String(pathComponents[i]);
      if (converted == null)
        return null;
      result.append(converted);
      if (i < pathComponents.length - 1) {
        result.append(Path.SEPARATOR_CHAR);
      }
    }
    return result.toString();
  }
358595
public static ArrayList<String> toList( String[] array )
	{
		if( array == null )
		{
			return new ArrayList<String>( 0 );
		}
		ArrayList<String> list = new ArrayList<String>( array.length );
		for (String s : array)
		{
			list.add( s );
		}
		return list;
	}
242805
@Nonnull
  @MayContainNull
  @Weight(Weight.Unit.NORMAL)
  public static <T> T[] joinArrays(@MayContainNull final T[]... arrays) {
    int commonLength = 0;
    for (final T[] array : arrays) {
      if (array != null) {
        commonLength += array.length;
      }
    }
    @SuppressWarnings("unchecked")
    final T[] result = (T[]) Array.newInstance(arrays.getClass().getComponentType().getComponentType(), commonLength);
    int position = 0;
    for (final T[] array : arrays) {
      if (array != null) {
        System.arraycopy(array, 0, result, position, array.length);
        position += array.length;
      }
    }
    return result;
  }
788506
function _gpfPathJoin (path) {
    var splitPath = _gpfPathDecompose(path);
    _gpfArrayTail(arguments).forEach(_gpfPathAppend.bind(null, splitPath));
    return splitPath.join("/");
}
1087122
private String[] mergeAndConvert(List<String> list, String[] array) {
        Set<String> set = new HashSet<String>(Arrays.asList(array));
        set.addAll(list);
        return set.toArray(new String[set.size()]);
    }
724268
public static String join(final Object array, final String separator) {

    return isArray(array) ? join(toArray(array, ClassUtils.getComponentClass(array)), separator)
      : Objects.toString(array);
  }
186887
public static String join(final String path1, final String path2) {
        if (path1.isEmpty() && path2.isEmpty()) return "";
        if (path1.isEmpty() && !path2.isEmpty()) return path2;
        if (path2.isEmpty() && !path1.isEmpty()) return path1;
        final StringBuilder sb = new StringBuilder(DEFAULT_BUFFER_SIZE);
        sb.append(path1);
        if (sb.charAt(sb.length() - 1) == '/') sb.setLength(sb.length() - 1);
        if (path2.charAt(0) != '/') sb.append('/');
        sb.append(path2);
        return sb.toString();
    }
393607
protected static String getArray(List<String> paths) {
        StringBuilder builder = new StringBuilder();

        for (String s : paths) {
            if (builder.length() == 0) {
                builder.append(s);
            } else {
                builder.append(",").append(s);
            }
        }

        return builder.toString();
    }
127993
static int[] join(int[] pathToY, int[] pathToZ) {
        int[] path = copyOf(pathToY, pathToY.length + pathToZ.length);
        int j = path.length - 1;
        for (int i = 0; i < pathToZ.length; i++) {
            path[j--] = pathToZ[i];
        }
        return path;
    }
374785
public static PathMetadata forArrayAccess(Path<?> parent, Expression<Integer> index) {
        return new PathMetadata(parent, index, PathType.ARRAYVALUE);
    }
597950
public static List<PathOperation> toPathOperationsList(String path, Path pathModel) {
        List<PathOperation> pathOperations = new ArrayList<>();
        getOperationMap(pathModel).forEach((httpMethod, operation) ->
                pathOperations.add(new PathOperation(httpMethod, path, operation)));
        return pathOperations;
    }
166899
public static PathMappingResult of(String path, @Nullable String query) {
        return of(path, query, ImmutableMap.of());
    }
621118
public static byte[] combine(final Collection<byte[]> arrays) {
        int length = 0;
        for (final byte[] array : arrays) {
            length += array.length;
        }
        final byte[] joinedArray = new byte[length];
        
        int position = 0;
        for (final byte[] array : arrays) {
            System.arraycopy(array, 0, joinedArray, position, array.length);
            position += array.length;
        }
        return joinedArray;
    }
1002785
public static ByteArray createByteArray(String path)
    {
        byte[] bytes = IOUtil.readBytes(path);
        if (bytes == null) return null;
        return new ByteArray(bytes);
    }
72044
public static Map<String, Integer> getKeywordCounts(String[] keywordArray)
    {
        Map<String, Integer> counts = new HashMap<String, Integer>();

        Integer counter;
        for (int i = 0; i < keywordArray.length; ++i)
        {
            counter = counts.get(keywordArray[i]);
            if (counter == null)
            {
                counter = 0;
            }
            counts.put(keywordArray[i], ++counter); //增加词频
        }

        return counts;
    }