Class TimeUnit


  • public class TimeUnit
    extends org.apache.tools.ant.types.EnumeratedAttribute
    The enumeration of units: millisecond, second, minute, hour, day, week, month, year.
    Version:
    $Revision: 132 $
    • Constructor Summary

      Constructors 
      Constructor Description
      TimeUnit()
      Constructor for TimeUnit
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      long getMultiplier()
      Gets the multiplier attribute of the TimeUnit object
      java.lang.String[] getValues()
      Gets the values attribute of the TimeUnit object
      protected void setValueProgrammatically​(java.lang.String value)
      set the inner value programmatically.
      long toMillis​(long numberOfUnits)
      convert the time in the current unit, to millis
      • Methods inherited from class org.apache.tools.ant.types.EnumeratedAttribute

        containsValue, getIndex, getInstance, getValue, indexOfValue, setValue, toString
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • TimeUnit

        public TimeUnit()
        Constructor for TimeUnit
    • Method Detail

      • setValueProgrammatically

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

        public long getMultiplier()
        Gets the multiplier attribute of the TimeUnit object
        Returns:
        The multiplier value
      • getValues

        public java.lang.String[] getValues()
        Gets the values attribute of the TimeUnit object
        Specified by:
        getValues in class org.apache.tools.ant.types.EnumeratedAttribute
        Returns:
        The values value
      • 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