Rev 210 |
Blame |
Last modification |
View Log
| RSS feed
/*********************************************************************************************************************************
* *
* class representing the MK-Version *
* *
* Author: Marcus -LiGi- Bueschleb *
* Project-Start: 9/2007 *
* Mailto: ligi@smart4mobile.de *
* Licence: Creative Commons / Non Commercial *
* Big Up: Holger&Ingo *
*********************************************************************************************************************************/
public class MKVersion
{
public int major=-
1;
public int minor=-
1;
public int compatible=-
1;
public String str=
"--";
public final byte VERSION_AFTER=
0;
public final byte VERSION_EQUAL=
1;
public final byte VERSION_PREVIOUS=
2;
public void set_by_mk_data
(int[] data
)
{
major=data
[0];
minor=data
[1];
compatible=data
[2];
str=
"v"+major+
"."+minor+
"/"+compatible
;
}
public byte compare
(int major_c,
int minor_c
)
{
if ((major_c==major
)&&(minor_c==minor
))
return VERSION_EQUAL
;
// TODO - compare major - PC-COMPATIBLE
else if (minor_c
>minor
) return VERSION_AFTER
;
return VERSION_PREVIOUS
;
}
}