Applied-Energistics-2-tiler.../src/main/java/appeng/services/version/DefaultVersion.java

36 lines
712 B
Java
Raw Normal View History

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 )
{
super( revision, channel, build );
}
@Override
2015-09-30 14:24:40 +02:00
public boolean isNewerAs( final Version maybeOlder )
{
if( this.revision() > maybeOlder.revision() )
{
return true;
}
if( this.channel().compareTo( maybeOlder.channel() ) > 0 )
{
return true;
}
return this.build() > maybeOlder.build();
}
}