mro.util
Class CommonPath
java.lang.Object
mro.util.CommonPath
public class CommonPath
- extends java.lang.Object
Used to reduce tha amount of memory used when storing several
file names with one or several similar paths.
Field Summary |
(package private) java.util.HashMap<java.lang.String,java.lang.String> |
map
|
(package private) java.lang.String |
sep
|
Method Summary |
static java.lang.String |
commonStart(java.lang.String p1,
java.lang.String p2)
|
java.lang.String |
getLargestCommonPath()
|
java.util.Vector<java.lang.String> |
getPathAndFileName(java.lang.String fileName)
Returns the path (index 0) and file name (1) parts from
an entire file name. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
map
java.util.HashMap<java.lang.String,java.lang.String> map
sep
java.lang.String sep
CommonPath
public CommonPath()
getPathAndFileName
public java.util.Vector<java.lang.String> getPathAndFileName(java.lang.String fileName)
- Returns the path (index 0) and file name (1) parts from
an entire file name.
The former is stored here to reduce the amount of memory used
to represent file names with common paths.
getLargestCommonPath
public java.lang.String getLargestCommonPath()
commonStart
public static java.lang.String commonStart(java.lang.String p1,
java.lang.String p2)