public class DefaultVersion extends java.lang.Object implements Version
Modifier | Constructor and Description |
---|---|
|
DefaultVersion() |
protected |
DefaultVersion(int mayor,
int minor,
int rev,
java.lang.String classifier,
int build) |
Modifier and Type | Method and Description |
---|---|
boolean |
check(java.lang.String op,
Version other) |
java.lang.Object |
clone()
Creates a copy of the object.
|
int |
compareTo(java.lang.Object arg0) |
boolean |
equals(java.lang.Object obj) |
java.lang.String |
format(java.lang.String fmt)
Return the version formated as string with the format specified as fmt.
|
java.lang.String |
fullFormat() |
int |
getBuild() |
java.lang.String |
getClassifier() |
int |
getMajor() |
int |
getMayor() |
int |
getMinor() |
int |
getRevision() |
int |
hashCode() |
void |
loadFromState(PersistentState state)
Set the state of the object from the state passed as parameter.
|
Version |
parse(java.lang.String version) |
static void |
registerPersistence()
Register the class on PersistenceManager
|
void |
saveToState(PersistentState state)
Saves the internal state of the object on the provided
PersistentState object.
|
Version |
setBuild(int build) |
java.lang.String |
toString() |
finalize, getClass, notify, notifyAll, wait, wait, wait
cloneQuietly, cloneQuietly
public DefaultVersion()
protected DefaultVersion(int mayor, int minor, int rev, java.lang.String classifier, int build)
public int getRevision()
getRevision
in interface Version
public java.lang.String getClassifier()
getClassifier
in interface Version
public boolean check(java.lang.String op, Version other)
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String fullFormat()
fullFormat
in interface Version
public int compareTo(java.lang.Object arg0)
compareTo
in interface java.lang.Comparable
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
Cloneable
clone
in class java.lang.Object
java.lang.CloneNotSupportedException
- if the instance of the object cannot
be cloned. As this is extending Cloneable
so its sure
it implements it, so this exception may be used for problems on specific
object instances.Object#clone()}.
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String format(java.lang.String fmt)
Version
public void saveToState(PersistentState state) throws PersistenceException
Persistent
saveToState
in interface Persistent
PersistenceException
public void loadFromState(PersistentState state) throws PersistenceException
Persistent
loadFromState
in interface Persistent
PersistenceException
public static void registerPersistence()