Here you can find the source of splitHistory(String history)
Parameter | Description |
---|---|
history | a parameter |
public static List<String> splitHistory(String history)
//package com.java2s; //License from project: LGPL import java.util.Arrays; import java.util.List; public class Main { public static final String HISTORY_SEP = "/"; public static final String HISTORY_SEP_REGEX = "/"; /**/* w w w .j a v a2s. c om*/ * Split history string to history path using HISTORY_SEP as the separator * * @param history * @return the history path */ public static List<String> splitHistory(String history) { List<String> historyPath; if (history.indexOf(HISTORY_SEP) == -1) { historyPath = Arrays.asList(history); } else { historyPath = Arrays.asList(history.split(HISTORY_SEP_REGEX)); } return historyPath; } }