不能 | 方法 | 描述 |
---|
1. | public void add(int field, int amount) | 将指定(有符号)的时间量添加到给定的日历字段。 |
2. | public boolean after (Object when) | 如果此 Calendar 表示的时间晚于 when Object 表示的时间,则该方法返回 true。 |
3. | public boolean before(Object when) | 如果此 Calendar 表示的时间早于 when Object 表示的时间,则该方法返回 true。 |
4. | public final void clear(int field) | 设置给定的日历字段值,并将此 Calendar 的时间值设置为未定义。 |
5. | public Object clone() | Clone 方法提供当前对象的副本。 |
6. | public int compareTo(Calendar anotherCalendar) | Calendar 类的 compareTo() 方法比较两个日历对象之间的时间值(毫秒偏移量)。 |
7. | protected void complete() | 它填充日历字段中的任何未设置字段。 |
8. | protected abstract void computeFields() | 它将当前的毫秒时间值 time 转换为 fields[] 中的日历字段值。 |
9. | protected abstract void computeTime() | 它将 fields[] 中的当前日历字段值转换为毫秒时间值 time。 |
10. | public boolean equals(Object object) | equals() 方法比较两个对象的相等性,如果它们相等,则返回 true。 |
11. | public int get(int field) | 在 get() 方法中,日历的字段作为参数传递,此方法返回作为参数传递的字段的值。 |
12. | public int getActualMaximum(int field) | 返回传递给 getActualMaximum() 方法作为参数的日历字段的最大可能值。 |
13. | public int getActualMinimum(int field) | 返回传递给 getActualMinimum() 方法作为参数的日历字段的最小可能值。 |
14. | public static Set<String> getAvailableCalendarTypes() | 返回一个集合,其中包含 Java 运行时环境支持的所有可用日历类型的字符串集合。 |
15. | public static Locale[] getAvailableLocales() | 返回 java 运行时环境中所有可用语言环境的数组。 |
16. | public String getCalendarType() | 以字符串形式返回 Java 运行时环境支持的所有可用日历类型。 |
17. | public String getDisplayName(int field, int style, Locale locale) | 以给定样式和语言环境返回作为参数传递的日历字段值的字符串表示形式。 |
18. | public Map<String,Integer> getDisplayNames(int field, int style, Locale locale) | 以给定样式和语言环境返回作为参数传递的日历字段值的 Map 表示形式。 |
19. | public int getFirstDayOfWeek() | 以整数形式返回一周的第一天。 |
20. | public abstract int getGreatestMinimum(int field) | 此方法返回作为参数传递的 Calendar 字段的最高最小值。 |
21. | public static Calendar getInstance() | 此方法与日历对象一起使用,以根据 Java 运行时环境设置的当前时区获取日历的实例。 |
22. | public abstract int getLeastMaximum(int field) | 从指定为方法参数的字段的所有最大值中返回值最小的值。 |
23. | public abstract int getMaximum(int field) | 此方法与日历对象一起使用,以获取指定日历字段的最大值作为参数。 |
24. | public int getMinimalDaysInFirstWeek() | 以整数形式返回所需的最小天数。 |
25. | public abstract int getMinimum(int field) | 此方法与日历对象一起使用,以获取指定日历字段的最小值作为参数。 |
26. | public final Date getTime() | 此方法获取日历对象的时间值并返回日期。 |
27. | public long getTimeInMillis() | 以毫秒为单位返回当前时间。此方法的返回类型为 long。 |
28. | public TimeZone getTimeZone() | 此方法获取日历对象的 TimeZone 并返回 TimeZone 对象。 |
29. | public int getWeeksInWeekYear() | 返回一年中的总周数。以整数形式返回一年中的周数。 |
30. | public int getWeekYear() | 此方法获取当前 Calendar 表示的一年中的周数。 |
31. | public int hashCode() | Java 中的所有其他类都重载 hasCode() 方法。此方法返回日历对象的哈希码。 |
32. | protected final int internalGet(int field) | 此方法返回作为参数传递的日历字段的值。 |
33. | Public boolean isLenient() | 返回值布尔值。 如果此日历的解释模式是宽松的,则返回 true;否则返回 false。 |
34. | public final boolean isSet(int field) | 此方法检查是否已设置作为参数指定的字段。 如果未设置,则返回 false,否则返回 true。 |
35. | public boolean isWeekDateSupported() | 检查此日历是否支持星期日期。 默认值为 false。 |
36. | public abstract void roll(int field, boolean up) | 此方法将指定日历字段增加或减少一个单位,而不影响其他字段 |
37. | public void set(int field, int value) | 按指定值设置指定的日历字段。 |
38. | public void setFirstDayOfWeek(int value) | 设置一周的第一天。 要设置为一周的第一天的值作为参数传递。 |
39. | public void setMinimalDaysInFirstWeek(int value) | 设置第一周所需的最少天数。 要设置为第一周的最少天数的值作为参数传递。 |
40. | public final void setTime(Date date) | 设置当前日历对象的时间。 Date 对象 id 作为参数传递。 |
41. | public void setTimeInMillis(long millis) | 以毫秒为单位设置当前时间。 |
42. | public void setTimeZone(TimeZone value) | 使用传递的 TimeZone 值(对象)作为参数设置 TimeZone。 |
43. | public void setWeekDate(int weekYear, int weekOfYear, int dayOfWeek) | 使用指定的整数值作为参数设置当前日期。 这些值是 weekYear、weekOfYear 和 dayOfWeek。 |
44. | public final Instant toInstant() | toInstant() 方法将当前对象转换为一个瞬间。 |
45. | public String toString() | 返回当前对象的字符串表示形式。 |