ilog.rules.xml.types

Class IlrGYearMonth

  • All Implemented Interfaces:
    java.io.Serializable


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

      • IlrGYearMonth

        public IlrGYearMonth()
        Builds a gYearMonth without any time zone.
      • IlrGYearMonth

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

        public IlrGYearMonth(java.util.Date date)
        Builds a gYearMonth without any time zone from a date.
      • IlrGYearMonth

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

      • set

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

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

        public void setPositive(boolean positive)
        Sets the year as positive.
      • setDate

        public void setDate(short century,
                   short year,
                   short month)
        Sets the gYeatrMonth from century/year/month.
      • isPositive

        public boolean isPositive()
        Determines if the gYearMonth is positive.
      • getCentury

        public short getCentury()
        Gets the century.
      • getYear

        public short getYear()
        Gets the year.
      • getMonth

        public short getMonth()
        Gets the month.
      • isEqual

        public boolean isEqual(IlrGYearMonth dt)
        Determines if two gYearMonth are equal.
      • equals

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

        public int compareTo(IlrGYearMonth date)
        Compares two GYearMonths. A GREATER comparison result means that the current GYearMonth is after the GYearMonth used in the parameter.
        Returns:
        EQUAL if equal, GREATER or LOWER, or NOT_COMPARABLE.

© Copyright IBM Corp. 1987, 2017