< prev index next >

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

Print this page

        

@@ -1,7 +1,7 @@
 /*
- * Copyright (c) 2003, 2006, Oracle and/or its affiliates. All rights reserved.
+ * 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,16 +510,16 @@
          * @see #getYear()
          */
         public abstract BigInteger getEonAndYear();
 
         /**
-         * Return number of month or {@link DatatypeConstants#FIELD_UNDEFINED}.
+         * 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 year  of this {@code XMLGregorianCalendar}.
+         * @return Returns the month of this {@code XMLGregorianCalendar}.
          *
          */
         public abstract int getMonth();
 
         /**

@@ -526,10 +526,12 @@
          * 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,10 +539,12 @@
          * {@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,10 +551,13 @@
          * 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,10 +564,13 @@
          * 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,10 +689,11 @@
      * {@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,10 +703,11 @@
     /**
      * 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,13 +865,13 @@
          *
          * @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,10 +980,12 @@
      *   <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,13 +1061,13 @@
      * @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 >