public class Version extends Object implements Comparable<Version>
| Constructor and Description |
|---|
Version(List<Long> indexes)
Creates a new version.
|
Version(String indexString)
Creates a new version.
|
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(Version otherVersion)
Compares the given version to this version using the index values.
|
boolean |
equals(Object obj) |
protected List<Long> |
extractIndexes(String indexString)
Extracts the indexes out of the given string as followes:
1.x.2.x => 1, null, 2, null
|
List<Long> |
getIndexes()
An empty list if no version is defined.
|
String |
getIndexesString()
Gets a string representation of the indexes as followes:
1, null, 2, null => 1.x.2.x
|
Long |
getScriptIndex()
Gets the last index in the list.
|
int |
hashCode() |
void |
setIndexes(List<Long> indexes)
Sets the indexes.
|
String |
toString() |
public Version(List<Long> indexes)
indexes - The script indexes, not nulltimeStamp - The script timestamppublic Version(String indexString)
indexString - The indexes as a stringpublic List<Long> getIndexes()
public Long getScriptIndex()
public void setIndexes(List<Long> indexes)
indexes - The script indexes, not nullpublic String getIndexesString()
protected List<Long> extractIndexes(String indexString)
indexString - The stringpublic String toString()
public int compareTo(Version otherVersion)
compareTo in interface Comparable<Version>otherVersion - The other version, not nullCopyright © 2016. All Rights Reserved.