Package org.exoplatform.portal.mop.user
Class Utils
java.lang.Object
org.exoplatform.portal.mop.user.Utils
A set of utils for this package.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic String[]Parse the path with the following algorithm: <ul> <li>The one char <code>/</code> string returns the null array</li> <li>Any leading <code>/<code> char is ommited</li> <li>Any trailing </code>/</code> chars are ommited</li> <li>All the substrings obtained by slicing the remaining string by the <code>/</code> char are returned as an array, even the empty strings</li> </ul> <p> Note that this is a reimplementation of a previous method that was using regex splitting, this reimplementation was done in order to minimize the created object count in mind and attempt to create the minimum required.
-
Constructor Details
-
Utils
public Utils()
-
-
Method Details
-
parsePath
Parse the path with the following algorithm: <ul> <li>The one char <code>/</code> string returns the null array</li> <li>Any leading <code>/<code> char is ommited</li> <li>Any trailing </code>/</code> chars are ommited</li> <li>All the substrings obtained by slicing the remaining string by the <code>/</code> char are returned as an array, even the empty strings</li> </ul> <p> Note that this is a reimplementation of a previous method that was using regex splitting, this reimplementation was done in order to minimize the created object count in mind and attempt to create the minimum required. </p>- Parameters:
path- the path- Returns:
- the parse result
- Throws:
NullPointerException- if the path argument is null
-