public interface IVersionView extends java.lang.Comparable<IVersionView>
equals(Object)
, hashCode()
and toString()
are properly overridden.
Instances can be acquired by IFactory.newVersionView(int...)
or IFactory.newVersionView(String)
.
IFactory.newVersionView(int...)
,
IFactory.newVersionView(String)
,
IVersionBean
Modifier and Type | Method and Description |
---|---|
int |
compareTo(IVersionView v)
Implements strict comparison.
|
int |
compareTo(IVersionView v,
boolean strict)
Compares this version view to the specified other version view.
|
boolean |
equals(java.lang.Object obj)
Properly overridden to check if the number of parts and the parts are equal.
|
int |
hashCode()
Properly overridden along with
equals(Object) , IVersionView 's can be used in hash-based structures. |
int |
length()
Returns the number of parts of this version view.
|
int |
part(int i)
Returns the
i th part of this version view. |
java.lang.String |
toString()
Properly overridden to return the string representation of this version view.
|
int length()
int part(int i)
i
th part of this version view.i
- part number to be returned (0-based)i
th part of this version viewint compareTo(IVersionView v)
compareTo
in interface java.lang.Comparable<IVersionView>
compareTo(IVersionView, boolean)
int compareTo(IVersionView v, boolean strict)
If strict mode is not enabled and the common parts of the version views are equal, the result will be 0.
If strict mode is enabled and the common parts of the version views are equal, the version view with more parts will be the greater.
Strict? | This | Other version | Result |
---|---|---|---|
true | 1.2.3 | 1.2.3 | 0 |
true | 1.3.3 | 1.2.3.1 | 1 |
true | 1.2.3 | 1.2.3.1 | -1 |
false | 1.2.3 | 1.2.3 | 0 |
false | 1.3.3 | 1.2.3.1 | 1 |
false | 1.2.3 | 1.2.3.1 | 0 |
v
- other version view to compare tostrict
- tells if only the common parts has to be checkedcompareTo(IVersionView)
boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
int hashCode()
equals(Object)
, IVersionView
's can be used in hash-based structures.hashCode
in class java.lang.Object
java.lang.String toString()
toString
in class java.lang.Object
This API documentation is public and is intended for / allowed to be used by anyone.
Scelight home page: https://sites.google.com/site/scelight/
Scelight is a trademark of András Belicza. Copyright © András Belicza, 2013-2015. All rights reserved.