ilog.rules.xml.types

Class IlrTime

  • All Implemented Interfaces:
    java.io.Serializable


    public class IlrTime
    extends IlrTimeZone
    This class represents the simple type time of the W3C XML Schema recommendation (http://www.w3.org/TR/xmlschema-2/#time).
    See Also:
    Serialized Form
    • Constructor Detail

      • IlrTime

        public IlrTime()
        Builds a time without any time zone.
      • IlrTime

        public IlrTime(long l)
        Builds an IlrTime from a long.
        Parameters:
        l - The long parameter
      • IlrTime

        public IlrTime(java.util.Date date)
        Builds a time without a time zone from a date.
      • IlrTime

        public IlrTime(java.util.Date date,
               java.util.TimeZone timeZone)
        Builds a time from a date and a time zone.
    • Method Detail

      • set

        public void set(java.util.Date date)
        Sets a time from a date.
      • set

        public void set(java.util.Date date,
               java.util.TimeZone timeZone)
        Sets a time from a date and a time zone.
      • setTime

        public void setTime(short hour,
                   short minute,
                   short second,
                   short millisecond)
        Sets a time from hour/minute/second/millisecond.
      • setPositive

        public void setPositive(boolean positive)
        Sets the time as positive.
      • isPositive

        public boolean isPositive()
        Determines if the time is positive.
      • getHour

        public short getHour()
        Gets the hour.
      • getMinute

        public short getMinute()
        Gets the minute.
      • getSecond

        public short getSecond()
        Gets the second.
      • getMillisecond

        public short getMillisecond()
        Gets the millisecond.
      • getFractionalSecond

        public java.lang.String getFractionalSecond()
        Get the remaining millisecond.
      • isEqual

        public boolean isEqual(IlrTime dt)
        Determines if two times are equal.
      • equals

        public boolean equals(java.lang.Object obj)
        Overrides:
        equals in class IlrTimeZone
      • compareTo

        public int compareTo(IlrTime date)
        Compares two times. A GREATER comparison result means that the current time is after the time used in the parameter.
        Returns:
        EQUAL if equal, GREATER or LOWER, or NOT_COMPARABLE.
      • valueOf

        public static IlrTime valueOf(java.lang.String str)
        Creates a time from a string.
        Throws:
        IlrDateFormatException - When the string format is invalid.

© Copyright IBM Corp. 1987, 2017