< prev index next >

src/java.xml/share/classes/javax/xml/datatype/XMLGregorianCalendar.java

Print this page

        

*** 1,7 **** /* ! * Copyright (c) 2003, 2006, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this --- 1,7 ---- /* ! * Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this
*** 510,525 **** * @see #getYear() */ public abstract BigInteger getEonAndYear(); /** ! * Return number of month or {@link DatatypeConstants#FIELD_UNDEFINED}. * * <p>Value constraints for this value are summarized in * <a href="#datetimefield-month">month field of date/time field mapping table</a>. * ! * @return year of this {@code XMLGregorianCalendar}. * */ public abstract int getMonth(); /** --- 510,525 ---- * @see #getYear() */ public abstract BigInteger getEonAndYear(); /** ! * Returns the month of this calendar or {@link DatatypeConstants#FIELD_UNDEFINED}. * * <p>Value constraints for this value are summarized in * <a href="#datetimefield-month">month field of date/time field mapping table</a>. * ! * @return Returns the month of this {@code XMLGregorianCalendar}. * */ public abstract int getMonth(); /**
*** 526,535 **** --- 526,537 ---- * Return day in month or {@link DatatypeConstants#FIELD_UNDEFINED}. * * <p>Value constraints for this value are summarized in * <a href="#datetimefield-day">day field of date/time field mapping table</a>. * + * @return Day in month of this {@code XMLGregorianCalendar}. + * * @see #setDay(int) */ public abstract int getDay(); /**
*** 537,546 **** --- 539,550 ---- * {@link DatatypeConstants#FIELD_UNDEFINED} if this optional field is not defined. * * <p>Value constraints for this value are summarized in * <a href="#datetimefield-timezone">timezone field of date/time field mapping table</a>. * + * @return Timezone offset in minutes of this {@code XMLGregorianCalendar}. + * * @see #setTimezone(int) */ public abstract int getTimezone(); /**
*** 547,556 **** --- 551,563 ---- * Return hours or {@link DatatypeConstants#FIELD_UNDEFINED}. * Returns {@link DatatypeConstants#FIELD_UNDEFINED} if this field is not defined. * * <p>Value constraints for this value are summarized in * <a href="#datetimefield-hour">hour field of date/time field mapping table</a>. + * + * @return Hours of this {@code XMLGregorianCalendar}. + * * @see #setTime(int, int, int) */ public abstract int getHour(); /**
*** 557,566 **** --- 564,576 ---- * Return minutes or {@link DatatypeConstants#FIELD_UNDEFINED}. * Returns {@link DatatypeConstants#FIELD_UNDEFINED} if this field is not defined. * * <p>Value constraints for this value are summarized in * <a href="#datetimefield-minute">minute field of date/time field mapping table</a>. + * + * @return Minutes of this {@code XMLGregorianCalendar}. + * * @see #setTime(int, int, int) */ public abstract int getMinute(); /**
*** 679,688 **** --- 689,699 ---- * {@code XMLGregorianCalendar} and * {@link #compare(XMLGregorianCalendar obj)} * returns {@link DatatypeConstants#EQUAL}, * otherwise {@code false}. */ + @Override public boolean equals(Object obj) { if (obj == null || !(obj instanceof XMLGregorianCalendar)) { return false; }
*** 692,701 **** --- 703,713 ---- /** * Returns a hash code consistent with the definition of the equals method. * * @return hash code of this object. */ + @Override public int hashCode() { // Following two dates compare to EQUALS since in different timezones. // 2000-01-15T12:00:00-05:00 == 2000-01-15T13:00:00-04:00 //
*** 853,865 **** * * @return A non-{@code null} valid {@code String} representation of this {@code XMLGregorianCalendar}. * * @throws IllegalStateException if the combination of set fields * does not match one of the eight defined XML Schema builtin date/time datatypes. - * * @see #toXMLFormat() */ public String toString() { return toXMLFormat(); } --- 865,877 ---- * * @return A non-{@code null} valid {@code String} representation of this {@code XMLGregorianCalendar}. * * @throws IllegalStateException if the combination of set fields * does not match one of the eight defined XML Schema builtin date/time datatypes. * @see #toXMLFormat() */ + @Override public String toString() { return toXMLFormat(); }
*** 968,977 **** --- 980,991 ---- * <li>Its fields ERA, YEAR, MONTH, DAY_OF_MONTH, HOUR_OF_DAY, * MINUTE, SECOND and MILLISECOND are set using the method * {@code Calendar.set(int,int)}</li> * </ul> * + * @return a {@code java.util.GregorianCalendar} conversion of this instance. + * * @see #toGregorianCalendar(java.util.TimeZone, java.util.Locale, XMLGregorianCalendar) */ public abstract GregorianCalendar toGregorianCalendar(); /**
*** 1047,1059 **** * @return TimeZone for this. */ public abstract TimeZone getTimeZone(int defaultZoneoffset); - /** * Creates and returns a copy of this object. * * @return copy of this {@code Object} */ public abstract Object clone(); } --- 1061,1073 ---- * @return TimeZone for this. */ public abstract TimeZone getTimeZone(int defaultZoneoffset); /** * Creates and returns a copy of this object. * * @return copy of this {@code Object} */ + @Override public abstract Object clone(); }
< prev index next >