|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectat.spardat.xma.boot.cache.VersionNumber
Support for version numbers in resource file names. It supports parsing of version numbers, insertion of version number for delta files, insertion of hash values into the filename and matching of file names that differ only in version numbers or hash values.
| Constructor Summary | |
VersionNumber(int major,
int minor,
int bugfix)
Constructs a VersionNumber with the given major, minor and bugfix number. |
|
| Method Summary | |
int |
compareTo(java.lang.Object other)
Compares this VersionNumber to an other. |
boolean |
equals(java.lang.Object other)
Tests if this VersionNumber is equal to an other |
int |
hashCode()
Gives a hash code value of this object. |
java.net.URL |
insertAsDelta(java.net.URL url)
Insert this version number into the given url to make it specifie the delta file to the file given in the url. |
static java.lang.String |
insertHash(java.lang.String filename,
java.lang.String hash)
Inserts the given hash value into the given filename. |
static java.util.regex.Pattern |
matchWithoutHashPattern(java.lang.String filename)
Creates a search pattern that matches all file defined by the given filename regardless of any included hash value. |
static VersionNumber |
parse(java.lang.String filename)
Parses the version number out of the given filename. |
static java.util.regex.Pattern |
searchPattern(java.lang.String filename)
Creates a search pattern that matches all other versions of the file defined by the given filename. |
java.lang.String |
toString()
Gives this version number as string. |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public VersionNumber(int major,
int minor,
int bugfix)
major - part of the versionminor - part of the versionbugfix - part of the version| Method Detail |
public static VersionNumber parse(java.lang.String filename)
filename - the filename to parse
public static java.util.regex.Pattern searchPattern(java.lang.String filename)
filename - to generate the search pattern for
public java.net.URL insertAsDelta(java.net.URL url)
url - to convert into a delta download url
public static java.lang.String insertHash(java.lang.String filename,
java.lang.String hash)
filename - to insert the hash value intohash - to insert into the filename
public static java.util.regex.Pattern matchWithoutHashPattern(java.lang.String filename)
filename - to generate the search pattern for
public java.lang.String toString()
public int compareTo(java.lang.Object other)
compareTo in interface java.lang.Comparableother - the VersionNumber to compare to.
java.lang.ClassCastException - if the parameter is not a VersionNumber.public boolean equals(java.lang.Object other)
other - the VersionNumber to compare to.
public int hashCode()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||