Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Change islamic calendar type to islamicc, and enhance Javadoc

See #97
  • Loading branch information...
commit a543e8e6cad0f65ed2191842243a7ac3f51a075e 1 parent b7cf549
@jodastephen jodastephen authored
View
22 src-standard/main/java/javax/time/chrono/CopticChronology.java
@@ -32,6 +32,7 @@
package javax.time.chrono;
import java.io.Serializable;
+import java.util.Locale;
import javax.time.DateTimeException;
import javax.time.DateTimes;
@@ -109,11 +110,32 @@ private Object readResolve() {
}
//-----------------------------------------------------------------------
+ /**
+ * Gets the ID of the chronology - 'Coptic'.
+ * <p>
+ * The ID uniquely identifies the {@code Chronology}.
+ * It can be used to lookup the {@code Chronology} using {@link #of(String)}.
+ *
+ * @return the chronology ID - 'Coptic'
+ * @see #getCalendarType()
+ */
@Override
public String getID() {
return "Coptic";
}
+ /**
+ * Gets the calendar type of the underlying calendar system - 'coptic'.
+ * <p>
+ * The calendar type is an identifier defined by the
+ * <em>Unicode Locale Data Markup Language (LDML)</em> specification.
+ * It can be used to lookup the {@code Chronology} using {@link #of(String)}.
+ * It can also be used as part of a locale, accessible via
+ * {@link Locale#getUnicodeLocaleType(String)} with the key 'ca'.
+ *
+ * @return the calendar system type - 'coptic'
+ * @see #getID()
+ */
@Override
public String getCalendarType() {
return "coptic";
View
25 src-standard/main/java/javax/time/chrono/HijrahChronology.java
@@ -34,6 +34,7 @@
import java.io.Serializable;
import java.util.HashMap;
+import java.util.Locale;
import javax.time.DateTimeException;
import javax.time.calendrical.DateTimeAccessor;
@@ -196,18 +197,34 @@ private Object readResolve() {
//-----------------------------------------------------------------------
/**
- * Gets the name of the chronology.
- *
- * @return the name of the chronology, never null
+ * Gets the ID of the chronology - 'Hijrah'.
+ * <p>
+ * The ID uniquely identifies the {@code Chronology}.
+ * It can be used to lookup the {@code Chronology} using {@link #of(String)}.
+ *
+ * @return the chronology ID - 'Hijrah'
+ * @see #getCalendarType()
*/
@Override
public String getID() {
return "Hijrah";
}
+ /**
+ * Gets the calendar type of the underlying calendar system - 'islamicc'.
+ * <p>
+ * The calendar type is an identifier defined by the
+ * <em>Unicode Locale Data Markup Language (LDML)</em> specification.
+ * It can be used to lookup the {@code Chronology} using {@link #of(String)}.
+ * It can also be used as part of a locale, accessible via
+ * {@link Locale#getUnicodeLocaleType(String)} with the key 'ca'.
+ *
+ * @return the calendar system type - 'islamicc'
+ * @see #getID()
+ */
@Override
public String getCalendarType() {
- return "islamic"; // TODO: or islamic-civil or arabic or arabic-civil ?
+ return "islamicc";
}
//-----------------------------------------------------------------------
View
22 src-standard/main/java/javax/time/chrono/ISOChronology.java
@@ -32,6 +32,7 @@
package javax.time.chrono;
import java.io.Serializable;
+import java.util.Locale;
import javax.time.DateTimeException;
import javax.time.DateTimes;
@@ -94,11 +95,32 @@ private Object readResolve() {
}
//-----------------------------------------------------------------------
+ /**
+ * Gets the ID of the chronology - 'ISO'.
+ * <p>
+ * The ID uniquely identifies the {@code Chronology}.
+ * It can be used to lookup the {@code Chronology} using {@link #of(String)}.
+ *
+ * @return the chronology ID - 'ISO'
+ * @see #getCalendarType()
+ */
@Override
public String getID() {
return "ISO";
}
+ /**
+ * Gets the calendar type of the underlying calendar system - 'iso8601'.
+ * <p>
+ * The calendar type is an identifier defined by the
+ * <em>Unicode Locale Data Markup Language (LDML)</em> specification.
+ * It can be used to lookup the {@code Chronology} using {@link #of(String)}.
+ * It can also be used as part of a locale, accessible via
+ * {@link Locale#getUnicodeLocaleType(String)} with the key 'ca'.
+ *
+ * @return the calendar system type - 'iso8601'
+ * @see #getID()
+ */
@Override
public String getCalendarType() {
return "iso8601";
View
21 src-standard/main/java/javax/time/chrono/JapaneseChronology.java
@@ -132,11 +132,32 @@ private Object readResolve() {
}
//-----------------------------------------------------------------------
+ /**
+ * Gets the ID of the chronology - 'Japanese'.
+ * <p>
+ * The ID uniquely identifies the {@code Chronology}.
+ * It can be used to lookup the {@code Chronology} using {@link #of(String)}.
+ *
+ * @return the chronology ID - 'Japanese'
+ * @see #getCalendarType()
+ */
@Override
public String getID() {
return "Japanese";
}
+ /**
+ * Gets the calendar type of the underlying calendar system - 'japanese'.
+ * <p>
+ * The calendar type is an identifier defined by the
+ * <em>Unicode Locale Data Markup Language (LDML)</em> specification.
+ * It can be used to lookup the {@code Chronology} using {@link #of(String)}.
+ * It can also be used as part of a locale, accessible via
+ * {@link Locale#getUnicodeLocaleType(String)} with the key 'ca'.
+ *
+ * @return the calendar system type - 'japanese'
+ * @see #getID()
+ */
@Override
public String getCalendarType() {
return "japanese";
View
22 src-standard/main/java/javax/time/chrono/MinguoChronology.java
@@ -35,6 +35,7 @@
import static javax.time.calendrical.LocalDateTimeField.YEAR;
import java.io.Serializable;
+import java.util.Locale;
import javax.time.DateTimeException;
import javax.time.DateTimes;
@@ -101,11 +102,32 @@ private Object readResolve() {
}
//-----------------------------------------------------------------------
+ /**
+ * Gets the ID of the chronology - 'Minguo'.
+ * <p>
+ * The ID uniquely identifies the {@code Chronology}.
+ * It can be used to lookup the {@code Chronology} using {@link #of(String)}.
+ *
+ * @return the chronology ID - 'Minguo'
+ * @see #getCalendarType()
+ */
@Override
public String getID() {
return "Minguo";
}
+ /**
+ * Gets the calendar type of the underlying calendar system - 'roc'.
+ * <p>
+ * The calendar type is an identifier defined by the
+ * <em>Unicode Locale Data Markup Language (LDML)</em> specification.
+ * It can be used to lookup the {@code Chronology} using {@link #of(String)}.
+ * It can also be used as part of a locale, accessible via
+ * {@link Locale#getUnicodeLocaleType(String)} with the key 'ca'.
+ *
+ * @return the calendar system type - 'roc'
+ * @see #getID()
+ */
@Override
public String getCalendarType() {
return "roc";
View
22 src-standard/main/java/javax/time/chrono/ThaiBuddhistChronology.java
@@ -36,6 +36,7 @@
import java.io.Serializable;
import java.util.HashMap;
+import java.util.Locale;
import javax.time.DateTimeException;
import javax.time.DateTimes;
@@ -121,11 +122,32 @@ private Object readResolve() {
}
//-----------------------------------------------------------------------
+ /**
+ * Gets the ID of the chronology - 'ThaiBuddhist'.
+ * <p>
+ * The ID uniquely identifies the {@code Chronology}.
+ * It can be used to lookup the {@code Chronology} using {@link #of(String)}.
+ *
+ * @return the chronology ID - 'ThaiBuddhist'
+ * @see #getCalendarType()
+ */
@Override
public String getID() {
return "ThaiBuddhist";
}
+ /**
+ * Gets the calendar type of the underlying calendar system - 'buddhist'.
+ * <p>
+ * The calendar type is an identifier defined by the
+ * <em>Unicode Locale Data Markup Language (LDML)</em> specification.
+ * It can be used to lookup the {@code Chronology} using {@link #of(String)}.
+ * It can also be used as part of a locale, accessible via
+ * {@link Locale#getUnicodeLocaleType(String)} with the key 'ca'.
+ *
+ * @return the calendar system type - 'buddhist'
+ * @see #getID()
+ */
@Override
public String getCalendarType() {
return "buddhist";
Please sign in to comment.
Something went wrong with that request. Please try again.