org.ojalgo.type
Class TypeUtils

java.lang.Object
  extended by org.ojalgo.type.TypeUtils

public abstract class TypeUtils
extends Object


Field Summary
static GregorianCalendar FUTURE
           
static GregorianCalendar HISTORY
           
static long HOURS_PER_YEAR
           
static long MILLIS_PER_HOUR
           
static SimpleDateFormat SQL_DATE_FORMAT
           
static SimpleDateFormat SQL_TIME_FORMAT
           
static SimpleDateFormat SQL_TIMESTAMP_FORMAT
           
 
Method Summary
static boolean isZero(double aNmbr)
           
static Date makeSqlDate(long aTimeInMillis)
           
static Time makeSqlTime(long aTimeInMillis)
           
static Timestamp makeSqlTimestamp(long aTimeInMillis)
           
static BigDecimal toBigDecimal(Number aNumber)
          If the input Number is a BigDecimal it is passed through unaltered.
static ComplexNumber toComplexNumber(Number aNumber)
           
static String toHexString(Color aColor)
          The way colours are specified in html pages.
static RationalNumber toRationalNumber(Number aNumber)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FUTURE

public static final GregorianCalendar FUTURE

HISTORY

public static final GregorianCalendar HISTORY

HOURS_PER_YEAR

public static final long HOURS_PER_YEAR
See Also:
Constant Field Values

MILLIS_PER_HOUR

public static final long MILLIS_PER_HOUR
See Also:
Constant Field Values

SQL_DATE_FORMAT

public static final SimpleDateFormat SQL_DATE_FORMAT

SQL_TIME_FORMAT

public static final SimpleDateFormat SQL_TIME_FORMAT

SQL_TIMESTAMP_FORMAT

public static final SimpleDateFormat SQL_TIMESTAMP_FORMAT
Method Detail

isZero

public static boolean isZero(double aNmbr)

makeSqlDate

public static Date makeSqlDate(long aTimeInMillis)

makeSqlTime

public static Time makeSqlTime(long aTimeInMillis)

makeSqlTimestamp

public static Timestamp makeSqlTimestamp(long aTimeInMillis)

toBigDecimal

public static BigDecimal toBigDecimal(Number aNumber)
If the input Number is a BigDecimal it is passed through unaltered. Otherwise an equivalent BigDecimal is created.

Parameters:
aNumber - Any Number
Returns:
A corresponding BigDecimal

toComplexNumber

public static ComplexNumber toComplexNumber(Number aNumber)

toHexString

public static String toHexString(Color aColor)
The way colours are specified in html pages.


toRationalNumber

public static RationalNumber toRationalNumber(Number aNumber)