dk.netarkivet.harvester.datamodel
Class NumberUtils

java.lang.Object
  extended by dk.netarkivet.harvester.datamodel.NumberUtils

public class NumberUtils
extends java.lang.Object

Number related utilities


Constructor Summary
NumberUtils()
           
 
Method Summary
static int compareInf(long l1, long l2)
          compare two given positive longs, with the addition that -1 means infinity
static long minInf(long l1, long l2)
          Return the smallest value of two given positive longs, with the addition that -1 means infinity
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NumberUtils

public NumberUtils()
Method Detail

minInf

public static long minInf(long l1,
                          long l2)
Return the smallest value of two given positive longs, with the addition that -1 means infinity

Parameters:
l1 - The first value
l2 - The second value
Returns:
Smallest value

compareInf

public static int compareInf(long l1,
                             long l2)
compare two given positive longs, with the addition that -1 means infinity

Parameters:
l1 - The first value
l2 - The second value
Returns:
-1 if first value is smallest, 0 if equal, 1 if second value is smallest