|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.perforce.api.Utils
Class that contains static utility methods.
HashDecay
Constructor Summary | |
Utils()
|
Method Summary | |
static void |
cleanUp()
Cleans up after the package has been used. |
static String |
commonPrefix(Enumeration en)
Returns common prefix for an Enumeration of strings. |
static String |
commonPrefix(Vector v)
Returns common prefix for a Vector of strings. |
static StringBuffer |
formatDepotPath(String path,
String pathfmt,
String filefmt,
String revfmt,
boolean urlencode)
Breaks up a depot path and formats each level. |
static int |
getChangeFromPath(String path)
Returns the change number portion of a depot path, if there is a valid one found. |
static Enumeration |
getEnumeration(Iterator i)
|
static String |
HTMLEncode(String str)
Returns the string encoded for HTML use. |
static void |
initPackage()
Initializes the package, in order to avoid some arbitrary JVM problems that have been encountered. |
static boolean |
isMSJVM()
Check to see if the current Java Virtual Machine is made by Microsoft |
static boolean |
isWindows()
Check to see if the current operating system is a Windows OS |
static boolean |
wildPathMatch(String wildpath,
String path)
Returns true if the path matches the wildpath . |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Utils()
Method Detail |
public static void cleanUp()
public static String commonPrefix(Enumeration en)
public static String commonPrefix(Vector v)
public static StringBuffer formatDepotPath(String path, String pathfmt, String filefmt, String revfmt, boolean urlencode) throws PerforceException
This is extremely useful for setting up links from each component of a path.
path
- The path to be formatted.pathfmt
- The format to be used for path elements.filefmt
- The format to be used for the file element.revfmt
- The format to be used for the rev component.urlencode
- Determines if paths are encoded.URLEncoder
public static final int getChangeFromPath(String path)
public static Enumeration getEnumeration(Iterator i)
public static String HTMLEncode(String str)
> becomes > and < becomes <
public static void initPackage()
public static boolean isMSJVM()
public static boolean isWindows()
public static boolean wildPathMatch(String wildpath, String path)
path
matches the wildpath
.
Only perforce wildcards are considered in the wildpath
.
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |