Package com.google.type
Enum Class CalendarPeriod
- All Implemented Interfaces:
com.google.protobuf.Internal.EnumLite
,Serializable
,Comparable<CalendarPeriod>
,Constable
public enum CalendarPeriod
extends Enum<CalendarPeriod>
implements com.google.protobuf.Internal.EnumLite
A `CalendarPeriod` represents the abstract concept of a time period that has a canonical start. Grammatically, "the start of the current `CalendarPeriod`." All calendar times begin at midnight UTC.Protobuf enum
google.type.CalendarPeriod
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionUndefined period, raises an error.A day.A fortnight.A half-year.A month.A quarter.A week.A year. -
Field Summary
Modifier and TypeFieldDescriptionstatic final int
Undefined period, raises an error.static final int
A day.static final int
A fortnight.static final int
A half-year.static final int
A month.static final int
A quarter.static final int
A week.static final int
A year. -
Method Summary
Modifier and TypeMethodDescriptionstatic CalendarPeriod
forNumber
(int value) final int
static com.google.protobuf.Internal.EnumLiteMap<CalendarPeriod>
static com.google.protobuf.Internal.EnumVerifier
static CalendarPeriod
valueOf
(int value) Deprecated.static CalendarPeriod
Returns the enum constant of this class with the specified name.static CalendarPeriod[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
CALENDAR_PERIOD_UNSPECIFIED
Undefined period, raises an error.
CALENDAR_PERIOD_UNSPECIFIED = 0;
-
DAY
A day.
DAY = 1;
-
WEEK
A week. Weeks begin on Monday, following [ISO 8601](https://en.wikipedia.org/wiki/ISO_week_date).
WEEK = 2;
-
FORTNIGHT
A fortnight. The first calendar fortnight of the year begins at the start of week 1 according to [ISO 8601](https://en.wikipedia.org/wiki/ISO_week_date).
FORTNIGHT = 3;
-
MONTH
A month.
MONTH = 4;
-
QUARTER
A quarter. Quarters start on dates 1-Jan, 1-Apr, 1-Jul, and 1-Oct of each year.
QUARTER = 5;
-
HALF
A half-year. Half-years start on dates 1-Jan and 1-Jul.
HALF = 6;
-
YEAR
A year.
YEAR = 7;
-
UNRECOGNIZED
-
-
Field Details
-
CALENDAR_PERIOD_UNSPECIFIED_VALUE
public static final int CALENDAR_PERIOD_UNSPECIFIED_VALUEUndefined period, raises an error.
CALENDAR_PERIOD_UNSPECIFIED = 0;
- See Also:
-
DAY_VALUE
public static final int DAY_VALUEA day.
DAY = 1;
- See Also:
-
WEEK_VALUE
public static final int WEEK_VALUEA week. Weeks begin on Monday, following [ISO 8601](https://en.wikipedia.org/wiki/ISO_week_date).
WEEK = 2;
- See Also:
-
FORTNIGHT_VALUE
public static final int FORTNIGHT_VALUEA fortnight. The first calendar fortnight of the year begins at the start of week 1 according to [ISO 8601](https://en.wikipedia.org/wiki/ISO_week_date).
FORTNIGHT = 3;
- See Also:
-
MONTH_VALUE
public static final int MONTH_VALUEA month.
MONTH = 4;
- See Also:
-
QUARTER_VALUE
public static final int QUARTER_VALUEA quarter. Quarters start on dates 1-Jan, 1-Apr, 1-Jul, and 1-Oct of each year.
QUARTER = 5;
- See Also:
-
HALF_VALUE
public static final int HALF_VALUEA half-year. Half-years start on dates 1-Jan and 1-Jul.
HALF = 6;
- See Also:
-
YEAR_VALUE
public static final int YEAR_VALUEA year.
YEAR = 7;
- See Also:
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
getNumber
public final int getNumber()- Specified by:
getNumber
in interfacecom.google.protobuf.Internal.EnumLite
-
valueOf
Deprecated.Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
value
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
forNumber
-
internalGetValueMap
-
internalGetVerifier
public static com.google.protobuf.Internal.EnumVerifier internalGetVerifier()
-