Class BLCNumberUtils

java.lang.Object
org.broadleafcommerce.common.util.BLCNumberUtils

public class BLCNumberUtils extends Object
Convenience methods for interacting with Java number types
Author:
Daniel Colgrove (dcolgrove)
  • Constructor Details

    • BLCNumberUtils

      public BLCNumberUtils()
  • Method Details

    • toLong

      public static Long toLong(Object objectToConvert)
      Given an Object of type Integer or Long, converts the Object instance to a Long. This will throw a ClassCastException if the past parameter is not either an Integer or a Long.
      Parameters:
      objectToConvert -
      Returns:
      Long