Class TypeUtils

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

public abstract class TypeUtils extends Object
  • Field Details

  • Constructor Details

    • TypeUtils

      protected TypeUtils()
  • Method Details

    • format

      public static String format(String messagePattern, Object... args)
      Compatible with slf4j. {} in the message pattern will be replaced by the arguments.
    • getHundredYearsAgo

      public static final GregorianCalendar getHundredYearsAgo()
    • getThousandYearsAgo

      public static final GregorianCalendar getThousandYearsAgo()
    • getThousandYearsFromNow

      public static final GregorianCalendar getThousandYearsFromNow()
    • toBigDecimal

      public static BigDecimal toBigDecimal(Comparable<?> number)
      If the input
      invalid reference
      java.lang.Comparale
      is a BigDecimal it is passed through unaltered. Otherwise an equivalent BigDecimal is created. ALWAYS returns a valid BigDecimal instance - which, among other things, means that null and NaN are replaced by 0.0 (zero).
      Parameters:
      number - Any Number
      Returns:
      A corresponding BigDecimal
    • toBigDecimal

      public static BigDecimal toBigDecimal(Comparable<?> number, NumberContext context)
    • toHexString

      public static String toHexString(int colour)
      The way colours are specified in html pages.
    • isSameDate

      static boolean isSameDate(Calendar aCal1, Calendar aCal2)
    • isSameTime

      static boolean isSameTime(Calendar aCal1, Calendar aCal2)