|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.kuka.common.versioning.AbstractVersion
public abstract class AbstractVersion
Abstract base class for immutable versions.
| Field Summary | |
|---|---|
protected static String |
versionSeperator
Version part separator. |
| Constructor Summary | |
|---|---|
protected |
AbstractVersion(int[] initialFields,
int minRequired)
Creates an instance of the class from the specified version fields array. |
protected |
AbstractVersion(int maxNumFields,
int minRequired)
Create a version with all fields set to zero. |
protected |
AbstractVersion(int numFields,
int minRequired,
String version)
Called by the superclass to specify the version format and parse the value from an input string. |
| Method Summary | |
|---|---|
int |
compareTo(AbstractVersion other)
|
boolean |
equals(Object obj)
|
int |
getField(int idx)
Access the value of the field with the given index. |
int |
getVersionLength()
|
int |
hashCode()
|
protected int |
parseVersionString(int[] fields,
int numFields,
int minRequired,
String version)
Parses the specified string into the specified array of integer version fields. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected static final String versionSeperator
| Constructor Detail |
|---|
protected AbstractVersion(int numFields,
int minRequired,
String version)
numFields - The maximum number of fields of this versionminRequired - The minimal required fieldsversion - The input string to be parsed
IllegalArgumentException - The input string could not be parsed
protected AbstractVersion(int maxNumFields,
int minRequired)
maxNumFields - The maximum number of fields of this versionminRequired - The minimal required fields
protected AbstractVersion(int[] initialFields,
int minRequired)
initialFields - initial version fields.minRequired - minimum required number of fields.| Method Detail |
|---|
protected int parseVersionString(int[] fields,
int numFields,
int minRequired,
String version)
fields - target arraynumFields - number of fields to parse.minRequired - minimal required number of fields.version - version string to parse
public int getField(int idx)
idx - The 0-based field index
public int getVersionLength()
public String toString()
toString in class Objectpublic int compareTo(AbstractVersion other)
compareTo in interface Comparable<AbstractVersion>public boolean equals(Object obj)
equals in class Objectpublic int hashCode()
hashCode in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||