ilog.rules.xml.types

Class IlrGYear

  • All Implemented Interfaces:
    java.io.Serializable


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

      • IlrGYear

        public IlrGYear()
        Builds a gYear without any time zone.
      • IlrGYear

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

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

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

      • set

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

        public void set(java.util.Date date,
               java.util.TimeZone timeZone)
        Sets a gYear 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)
        Sets the gYear from century/year.
      • isPositive

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

        public short getCentury()
        Gets the century.
      • getYear

        public short getYear()
        Gets the year.
      • isEqual

        public boolean isEqual(IlrGYear dt)
        Determines if two gYear are equal.
      • equals

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

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

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

© Copyright IBM Corp. 1987, 2017