public class Version extends Object implements Comparable<Version>
| Modifier and Type | Method and Description |
|---|---|
String |
asID()
Returns the version as an ID - according to the current cursors.
|
int |
compareTo(Version o) |
Version |
copy()
Creates a copy of this version object.
|
boolean |
equals(Object o) |
int |
getCursor(int index)
Returns the cursor corresponding to pattern's segment at the given index.
|
Pattern |
getPattern()
Returns the pattern using which this version was parsed.
|
int |
hashCode() |
void |
next()
Moves to the next version (accordingly to the
pattern). |
String |
toString() |
public int compareTo(Version o)
compareTo in interface Comparable<Version>public int getCursor(int index)
The given index must be >= 0, simultaneously less than the amount of segments defining the pattern.
The returned cursor is guaranteed to be >= 0 and less than Segment.length().
index - the index of the cursor to returnpublic void next()
pattern).
More formally, shifts the cursor of the least significant segment (on the right). If it is the last element in the segment's definition, shifts the cursor of 2nd least significant part (just to the left), etc.
For example, 1.2 > 1.3 (depending on the pattern configuration, just for
illustration).
public String asID()
public Version copy()
More formally, only makes a shallow copy of the cursor indexes.
public Pattern getPattern()
Copyright © 2022. All rights reserved.