jopt.csp.util
Class LongUtil

java.lang.Object
  extended byjopt.csp.util.LongUtil

public class LongUtil
extends java.lang.Object

Long type utility functions


Constructor Summary
LongUtil()
           
 
Method Summary
static long getMax(CspNumExpr expr)
          Returns maximum value of a numeric expression as a long type
static long getMax(VariableSolution sol)
          Returns maximum value of a numeric expression as a double type
static long getMin(CspNumExpr expr)
          Returns minimum value of a numeric expression as a long type
static long getMin(VariableSolution sol)
          Returns minimum value of a numeric expression as a double type
static int intValue(long val)
          Returns equivalent integer value for a given long value.
static boolean isIntEquivalent(long val)
          Returns true if value is equivalent to an integer value
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LongUtil

public LongUtil()
Method Detail

isIntEquivalent

public static boolean isIntEquivalent(long val)
Returns true if value is equivalent to an integer value


intValue

public static int intValue(long val)
Returns equivalent integer value for a given long value. Will return integer min / max value in case of overflow


getMin

public static long getMin(CspNumExpr expr)
Returns minimum value of a numeric expression as a long type


getMax

public static long getMax(CspNumExpr expr)
Returns maximum value of a numeric expression as a long type


getMin

public static long getMin(VariableSolution sol)
Returns minimum value of a numeric expression as a double type


getMax

public static long getMax(VariableSolution sol)
Returns maximum value of a numeric expression as a double type