com.h3xstream.retirejs.util
Class CompareVersionUtil

java.lang.Object
  extended by com.h3xstream.retirejs.util.CompareVersionUtil

public class CompareVersionUtil
extends Object

Utility to compare


Constructor Summary
CompareVersionUtil()
           
 
Method Summary
static boolean atOrAbove(String version, String atOrAbove)
           
static boolean isUnder(String version, String under)
          Method that calculate if [Version 1] is under [Version 2]
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CompareVersionUtil

public CompareVersionUtil()
Method Detail

isUnder

public static boolean isUnder(String version,
                              String under)
Method that calculate if [Version 1] is under [Version 2]
 1.0.1 - 1.0.2  : YES
 1.0.1 - 2.0.1  : YES
 1.3.2 - 1.2.5  : NO
 1.2.3 - 1.2.3  : NO
 
=== Reimplementation of isAtOrAbove (but reverse) https://github.com/bekk/retire.js/blob/master/node/lib/retire.js#L85

Parameters:
version - Version to compare
under - Version serving as reference
Returns:
True if [version] < [under]

atOrAbove

public static boolean atOrAbove(String version,
                                String atOrAbove)


Copyright © 2015. All rights reserved.