Class TimeUnit

java.lang.Object
org.apache.tools.ant.types.EnumeratedAttribute
ise.antelope.tasks.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 $
  • Field Details

  • Constructor Details

    • TimeUnit

      public TimeUnit()
      Constructor for TimeUnit
  • Method Details

    • setValueProgrammatically

      protected void setValueProgrammatically(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 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