2015-03-09 17:35:19 +01:00
|
|
|
package appeng.services.version;
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* AE prints version like rv2-beta-8
|
|
|
|
* GitHub prints version like rv2.beta.8
|
|
|
|
*/
|
|
|
|
public final class DefaultVersion extends BaseVersion
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* @param revision natural number
|
|
|
|
* @param channel either alpha, beta or release
|
|
|
|
* @param build natural number
|
|
|
|
*/
|
2015-09-30 14:24:40 +02:00
|
|
|
public DefaultVersion( final int revision, final Channel channel, final int build )
|
2015-03-09 17:35:19 +01:00
|
|
|
{
|
|
|
|
super( revision, channel, build );
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
2015-09-30 14:24:40 +02:00
|
|
|
public boolean isNewerAs( final Version maybeOlder )
|
2015-03-09 17:35:19 +01:00
|
|
|
{
|
2015-04-03 08:54:31 +02:00
|
|
|
if( this.revision() > maybeOlder.revision() )
|
2015-03-09 17:35:19 +01:00
|
|
|
{
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
2015-04-03 08:54:31 +02:00
|
|
|
if( this.channel().compareTo( maybeOlder.channel() ) > 0 )
|
2015-03-09 17:35:19 +01:00
|
|
|
{
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
return this.build() > maybeOlder.build();
|
|
|
|
}
|
|
|
|
}
|