Class Limit.TimeUnit

  • Enclosing class:
    Limit

    public static class Limit.TimeUnit
    extends org.apache.tools.ant.types.EnumeratedAttribute
    The enumeration of units: millisecond, second, minute, hour, day, week Todo: we use timestamps in many places, why not factor this out
    • Constructor Detail

      • TimeUnit

        public TimeUnit()
    • Method Detail

      • setValueProgrammatically

        protected void setValueProgrammatically​(java.lang.String value)
        set the inner value programmatically.
        Parameters:
        value - to set
      • getMultiplier

        public long getMultiplier()
      • getValues

        public java.lang.String[] getValues()
        Specified by:
        getValues in class org.apache.tools.ant.types.EnumeratedAttribute
      • toMillis

        public long toMillis​(long numberOfUnits)
        convert the time in the current unit, to millis
        Parameters:
        numberOfUnits - long expressed in the current objects units
        Returns:
        long representing the value in millis