67 |
* @param list The comma separated list. |
* @param list The comma separated list. |
68 |
* @return A <code>String</code> array containing all items in the list. |
* @return A <code>String</code> array containing all items in the list. |
69 |
*/ |
*/ |
70 |
protected static String[] |
public static String[] |
71 |
parseList(String list) { return parseList(list, ','); } |
parseList(String list) { return parseList(list, ','); } |
72 |
|
|
73 |
/** |
/** |
76 |
* @param separator Provides the character used as separator. |
* @param separator Provides the character used as separator. |
77 |
* @return A <code>String</code> array containing all items in the list. |
* @return A <code>String</code> array containing all items in the list. |
78 |
*/ |
*/ |
79 |
protected static String[] |
public static String[] |
80 |
parseList(String list, char separator) { |
parseList(String list, char separator) { |
81 |
if(list == null || list.length() == 0) return new String[0]; |
if(list == null || list.length() == 0) return new String[0]; |
82 |
int pos = 0; |
int pos = 0; |
97 |
* @param list The comma separated list with boolean values. |
* @param list The comma separated list with boolean values. |
98 |
* @return A <code>Boolean</code> array containing all items in the list. |
* @return A <code>Boolean</code> array containing all items in the list. |
99 |
*/ |
*/ |
100 |
protected static Boolean[] |
public static Boolean[] |
101 |
parseBoolList(String list) { |
parseBoolList(String list) { |
102 |
String[] ar = parseList(list); |
String[] ar = parseList(list); |
103 |
|
|
117 |
* |
* |
118 |
* @throws LscpException if the list contains value(s) from different type. |
* @throws LscpException if the list contains value(s) from different type. |
119 |
*/ |
*/ |
120 |
protected static Integer[] |
public static Integer[] |
121 |
parseIntList(String list) throws LscpException { return parseIntList(list, ','); } |
parseIntList(String list) throws LscpException { return parseIntList(list, ','); } |
122 |
|
|
123 |
/** |
/** |
129 |
* |
* |
130 |
* @throws LscpException if the list contains value(s) from different type. |
* @throws LscpException if the list contains value(s) from different type. |
131 |
*/ |
*/ |
132 |
protected static Integer[] |
public static Integer[] |
133 |
parseIntList(String list, char separator) throws LscpException { |
parseIntList(String list, char separator) throws LscpException { |
134 |
String[] ar = parseList(list, separator); |
String[] ar = parseList(list, separator); |
135 |
|
|
147 |
* |
* |
148 |
* @throws LscpException if the list contains value(s) from different type. |
* @throws LscpException if the list contains value(s) from different type. |
149 |
*/ |
*/ |
150 |
protected static Float[] |
public static Float[] |
151 |
parseFloatList(String list) throws LscpException { |
parseFloatList(String list) throws LscpException { |
152 |
String[] ar = parseList(list); |
String[] ar = parseList(list); |
153 |
|
|
162 |
* @param list The list to parse. |
* @param list The list to parse. |
163 |
* @return A <code>String</code> array containing all items in the list. |
* @return A <code>String</code> array containing all items in the list. |
164 |
*/ |
*/ |
165 |
protected static String[] |
public static String[] |
166 |
parseEscapedStringList(String list) throws LscpException { |
parseEscapedStringList(String list) throws LscpException { |
167 |
return parseEscapedStringList(list, ','); |
return parseEscapedStringList(list, ','); |
168 |
} |
} |
173 |
* @param separator Provides the character used as separator. |
* @param separator Provides the character used as separator. |
174 |
* @return A <code>String</code> array containing all items in the list. |
* @return A <code>String</code> array containing all items in the list. |
175 |
*/ |
*/ |
176 |
protected static String[] |
public static String[] |
177 |
parseEscapedStringList(String list, char separator) throws LscpException { |
parseEscapedStringList(String list, char separator) throws LscpException { |
178 |
if(list == null || list.length() == 0) return new String[0]; |
if(list == null || list.length() == 0) return new String[0]; |
179 |
int q1 = 0, q2 = 0; |
int q1 = 0, q2 = 0; |
213 |
* @return A <code>String</code> array containing all items in the list. |
* @return A <code>String</code> array containing all items in the list. |
214 |
* @throws LscpException if the list is broken. |
* @throws LscpException if the list is broken. |
215 |
*/ |
*/ |
216 |
protected static String[] |
public static String[] |
217 |
parseStringList(String list) throws LscpException { |
parseStringList(String list) throws LscpException { |
218 |
return parseStringList(list, ','); |
return parseStringList(list, ','); |
219 |
} |
} |
225 |
* @return A <code>String</code> array containing all items in the list. |
* @return A <code>String</code> array containing all items in the list. |
226 |
* @throws LscpException if the list is broken. |
* @throws LscpException if the list is broken. |
227 |
*/ |
*/ |
228 |
protected static String[] |
public static String[] |
229 |
parseStringList(String list, char separator) throws LscpException { |
parseStringList(String list, char separator) throws LscpException { |
230 |
if(list == null || list.length() == 0) return new String[0]; |
if(list == null || list.length() == 0) return new String[0]; |
231 |
int q1 = 0, q2 = 0; |
int q1 = 0, q2 = 0; |
287 |
* |
* |
288 |
* @throws LscpException if the list is broken. |
* @throws LscpException if the list is broken. |
289 |
*/ |
*/ |
290 |
protected static String[] |
public static String[] |
291 |
parseArray(String list) throws LscpException { |
parseArray(String list) throws LscpException { |
292 |
if(list == null || list.length() == 0) return new String[0]; |
if(list == null || list.length() == 0) return new String[0]; |
293 |
int q1 = 0, q2 = 0; |
int q1 = 0, q2 = 0; |
504 |
* @return New string without quotation marks if the string is quoted; else |
* @return New string without quotation marks if the string is quoted; else |
505 |
* the same string is returned. |
* the same string is returned. |
506 |
*/ |
*/ |
507 |
protected static String |
public static String |
508 |
removeQuotation(String s) { |
removeQuotation(String s) { |
509 |
if(s == null || s.length() < 2) return s; |
if(s == null || s.length() < 2) return s; |
510 |
char q = s.charAt(0); |
char q = s.charAt(0); |
709 |
/** |
/** |
710 |
* Determines whether the specified escaped path ends with a file separator. |
* Determines whether the specified escaped path ends with a file separator. |
711 |
*/ |
*/ |
712 |
protected static boolean |
public static boolean |
713 |
hasEndingFileSeparator(String path) { |
hasEndingFileSeparator(String path) { |
714 |
if(path == null || path.length() < 2) return false; |
if(path == null || path.length() < 2) return false; |
715 |
|
|
723 |
* If the specified escaped path ends with a file separator, |
* If the specified escaped path ends with a file separator, |
724 |
* a new string is returned with the ending file separator removed. |
* a new string is returned with the ending file separator removed. |
725 |
*/ |
*/ |
726 |
protected static String |
public static String |
727 |
removeEndingFileSeparator(String path) { |
removeEndingFileSeparator(String path) { |
728 |
if(path == null || path.length() < 2) return path; |
if(path == null || path.length() < 2) return path; |
729 |
|
|