org.apache.tools.ant.taskdefs

Class WaitFor.Unit

  • Enclosing class:
    WaitFor


    public static class WaitFor.Unit
    extends EnumeratedAttribute
    The enumeration of units: millisecond, second, minute, hour, day, week
    To do:
    we use timestamps in many places, why not factor this out
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      static java.lang.String DAY
      day string
      static java.lang.String HOUR
      hour string
      static java.lang.String MILLISECOND
      millisecond string
      static java.lang.String MINUTE
      minute string
      static java.lang.String SECOND
      second string
      static java.lang.String WEEK
      week string
    • Constructor Summary

      Constructors 
      Constructor and Description
      Unit()
      Constructor the Unit enumerated type.
    • Constructor Detail

      • Unit

        public Unit()
        Constructor the Unit enumerated type.
    • Method Detail

      • getMultiplier

        public long getMultiplier()
        Convert the value to a multipler (millisecond to unit).
        Returns:
        a multipler (a long value)
      • getValues

        public java.lang.String[] getValues()
        Description copied from class: EnumeratedAttribute
        This is the only method a subclass needs to implement.
        Specified by:
        getValues in class EnumeratedAttribute
        Returns:
        an array holding all possible values of the enumeration. The order of elements must be fixed so that indexOfValue(String) always return the same index for the same value.
        See Also:
        {@inheritDoc}