Class QuotaUtil

java.lang.Object
org.bedework.calfacade.util.QuotaUtil

public class QuotaUtil extends Object
Author:
douglm
  • Constructor Details

    • QuotaUtil

      public QuotaUtil()
  • Method Details

    • getSizeChange

      public static int getSizeChange(SizedEntity fromVal, SizedEntity toVal)
      Return the size change for the given object
      Parameters:
      fromVal - as it was
      toVal - as it is
      Returns:
      int chage
    • getSizeChange

      public static int getSizeChange(String fromVal, String toVal)
      Return the size change for the given object
      Parameters:
      fromVal - as it was
      toVal - as it is
      Returns:
      int chage
    • size

      public static int size(SizedEntity val)
      Parameters:
      val - sized entity
      Returns:
      int size
    • size

      public static int size(String val)
      This actually returns character size - not byte size. Getting byte size might slow things up.
      Parameters:
      val - string
      Returns:
      int
    • collectionSize

      public static int collectionSize(Collection<?> c)
      Parameters:
      c - a collection
      Returns:
      int size