From b1ca1aed08637ae1a7e5b453fffe82906c1aa87c Mon Sep 17 00:00:00 2001
From: cal101
* 用于实现自定义某个日期字段的调整,包括:
- *
+ *
*
* 1. 获取指定字段的起始时间
* 2. 获取指定字段的四舍五入时间
* 3. 获取指定字段的结束时间
*
- *
+ *
* @author looly
*
*/
@@ -31,7 +31,7 @@ public class DateModifier {
/**
* 修改日期
- *
+ *
* @param calendar {@link Calendar}
* @param dateField 日期字段,即保留到哪个日期字段
* @param modifyType 修改类型,包括舍去、四舍五入、进一等
@@ -87,7 +87,7 @@ public class DateModifier {
// -------------------------------------------------------------------------------------------------- Private method start
/**
* 修改日期字段值
- *
+ *
* @param calendar {@link Calendar}
* @param field 字段,见{@link Calendar}
* @param modifyType {@link ModifyType}
@@ -125,7 +125,7 @@ public class DateModifier {
/**
* 修改类型
- *
+ *
* @author looly
*
*/
diff --git a/hutool-core/src/main/java/cn/hutool/core/date/DateRange.java b/hutool-core/src/main/java/cn/hutool/core/date/DateRange.java
index 73aa6c353..485205a03 100644
--- a/hutool-core/src/main/java/cn/hutool/core/date/DateRange.java
+++ b/hutool-core/src/main/java/cn/hutool/core/date/DateRange.java
@@ -6,7 +6,7 @@ import java.util.Date;
/**
* 日期范围
- *
+ *
* @author looly
* @since 4.1.0
*/
@@ -15,7 +15,7 @@ public class DateRange extends Range
- *
+ *
* @see #Q1
* @see #Q2
* @see #Q3
* @see #Q4
- *
+ *
* @param intValue 季度int表示
* @return {@link Quarter}
*/
diff --git a/hutool-core/src/main/java/cn/hutool/core/date/SystemClock.java b/hutool-core/src/main/java/cn/hutool/core/date/SystemClock.java
index 83cf4bff6..3404e9188 100644
--- a/hutool-core/src/main/java/cn/hutool/core/date/SystemClock.java
+++ b/hutool-core/src/main/java/cn/hutool/core/date/SystemClock.java
@@ -11,12 +11,12 @@ import java.util.concurrent.TimeUnit;
* System.currentTimeMillis()的调用比new一个普通对象要耗时的多(具体耗时高出多少我还没测试过,有人说是100倍左右)
* System.currentTimeMillis()之所以慢是因为去跟系统打了一次交道
* 后台定时更新时钟,JVM退出时,线程自动回收
- *
+ *
* see: http://git.oschina.net/yu120/sequence
* @author lry,looly
*/
public class SystemClock {
-
+
/** 时钟更新间隔,单位毫秒 */
private final long period;
/** 现在时刻的毫秒数 */
@@ -50,7 +50,7 @@ public class SystemClock {
private long currentTimeMillis() {
return now;
}
-
+
//------------------------------------------------------------------------ static
/**
* 单例
diff --git a/hutool-core/src/main/java/cn/hutool/core/date/Week.java b/hutool-core/src/main/java/cn/hutool/core/date/Week.java
index 97025d24c..aa905511f 100644
--- a/hutool-core/src/main/java/cn/hutool/core/date/Week.java
+++ b/hutool-core/src/main/java/cn/hutool/core/date/Week.java
@@ -5,7 +5,7 @@ import java.util.Calendar;
/**
* 星期枚举
* 与Calendar中的星期int值对应
- *
+ *
* @see #SUNDAY
* @see #MONDAY
* @see #TUESDAY
@@ -13,7 +13,7 @@ import java.util.Calendar;
* @see #THURSDAY
* @see #FRIDAY
* @see #SATURDAY
- *
+ *
* @author Looly
*
*/
@@ -40,7 +40,7 @@ public enum Week {
/**
* 构造
- *
+ *
* @param value 星期对应{@link Calendar} 中的Week值
*/
Week(int value) {
@@ -49,16 +49,16 @@ public enum Week {
/**
* 获得星期对应{@link Calendar} 中的Week值
- *
+ *
* @return 星期对应{@link Calendar} 中的Week值
*/
public int getValue() {
return this.value;
}
-
+
/**
* 转换为中文名
- *
+ *
* @return 星期的中文名
* @since 3.3.0
*/
@@ -68,7 +68,7 @@ public enum Week {
/**
* 转换为中文名
- *
+ *
* @param weekNamePre 表示星期的前缀,例如前缀为“星期”,则返回结果为“星期一”;前缀为”周“,结果为“周一”
* @return 星期的中文名
* @since 4.0.11
@@ -96,7 +96,7 @@ public enum Week {
/**
* 将 {@link Calendar}星期相关值转换为Week枚举对象
- *
+ *
* @see #SUNDAY
* @see #MONDAY
* @see #TUESDAY
@@ -104,7 +104,7 @@ public enum Week {
* @see #THURSDAY
* @see #FRIDAY
* @see #SATURDAY
- *
+ *
* @param calendarWeekIntValue Calendar中关于Week的int值
* @return {@link Week}
*/
diff --git a/hutool-core/src/main/java/cn/hutool/core/date/Zodiac.java b/hutool-core/src/main/java/cn/hutool/core/date/Zodiac.java
index b7372e022..9e504f496 100644
--- a/hutool-core/src/main/java/cn/hutool/core/date/Zodiac.java
+++ b/hutool-core/src/main/java/cn/hutool/core/date/Zodiac.java
@@ -5,7 +5,7 @@ import java.util.Date;
/**
* 星座 来自:https://blog.csdn.net/u010758605/article/details/48317881
- *
+ *
* @author looly
* @since 4.4.3
*/
@@ -19,7 +19,7 @@ public class Zodiac {
/**
* 通过生日计算星座
- *
+ *
* @param date 出生日期
* @return 星座名
*/
@@ -29,7 +29,7 @@ public class Zodiac {
/**
* 通过生日计算星座
- *
+ *
* @param calendar 出生日期
* @return 星座名
*/
@@ -39,10 +39,10 @@ public class Zodiac {
}
return getZodiac(calendar.get(Calendar.MONTH), calendar.get(Calendar.DAY_OF_MONTH));
}
-
+
/**
* 通过生日计算星座
- *
+ *
* @param month 月,从0开始计数
* @param day 天
* @return 星座名
@@ -54,7 +54,7 @@ public class Zodiac {
/**
* 通过生日计算星座
- *
+ *
* @param month 月,从0开始计数,见{@link Month#getValue()}
* @param day 天
* @return 星座名
@@ -67,7 +67,7 @@ public class Zodiac {
// ----------------------------------------------------------------------------------------------------------- 生肖
/**
* 通过生日计算生肖,只计算1900年后出生的人
- *
+ *
* @param date 出生日期(年需农历)
* @return 星座名
*/
@@ -77,7 +77,7 @@ public class Zodiac {
/**
* 通过生日计算生肖,只计算1900年后出生的人
- *
+ *
* @param calendar 出生日期(年需农历)
* @return 星座名
*/
@@ -90,7 +90,7 @@ public class Zodiac {
/**
* 计算生肖,只计算1900年后出生的人
- *
+ *
* @param year 农历年
* @return 生肖名
*/
diff --git a/hutool-core/src/main/java/cn/hutool/core/date/chinese/package-info.java b/hutool-core/src/main/java/cn/hutool/core/date/chinese/package-info.java
index 8307df4e0..131018598 100644
--- a/hutool-core/src/main/java/cn/hutool/core/date/chinese/package-info.java
+++ b/hutool-core/src/main/java/cn/hutool/core/date/chinese/package-info.java
@@ -1,6 +1,6 @@
/**
* 农历相关类汇总,包括农历月、天干地支、农历节日、24节气等
- *
+ *
* @author looly
*
*/
diff --git a/hutool-core/src/main/java/cn/hutool/core/date/format/AbstractDateBasic.java b/hutool-core/src/main/java/cn/hutool/core/date/format/AbstractDateBasic.java
index a6e7f0fdf..889ea7006 100644
--- a/hutool-core/src/main/java/cn/hutool/core/date/format/AbstractDateBasic.java
+++ b/hutool-core/src/main/java/cn/hutool/core/date/format/AbstractDateBasic.java
@@ -6,14 +6,14 @@ import java.util.TimeZone;
public abstract class AbstractDateBasic implements DateBasic, Serializable {
private static final long serialVersionUID = 6333136319870641818L;
-
+
/** The pattern */
protected final String pattern;
/** The time zone. */
protected final TimeZone timeZone;
/** The locale. */
protected final Locale locale;
-
+
/**
* 构造,内部使用
* @param pattern 使用{@link java.text.SimpleDateFormat} 相同的日期格式
diff --git a/hutool-core/src/main/java/cn/hutool/core/date/format/DateBasic.java b/hutool-core/src/main/java/cn/hutool/core/date/format/DateBasic.java
index 23f041798..e8c7c4264 100644
--- a/hutool-core/src/main/java/cn/hutool/core/date/format/DateBasic.java
+++ b/hutool-core/src/main/java/cn/hutool/core/date/format/DateBasic.java
@@ -5,7 +5,7 @@ import java.util.TimeZone;
/**
* 日期基本信息获取接口
- *
+ *
* @author Looly
* @since 2.16.2
*/
@@ -13,21 +13,21 @@ public interface DateBasic {
/**
* 获得日期格式化或者转换的格式
- *
+ *
* @return {@link java.text.SimpleDateFormat}兼容的格式
*/
String getPattern();
/**
* 获得时区
- *
+ *
* @return {@link TimeZone}
*/
TimeZone getTimeZone();
/**
* 获得 日期地理位置
- *
+ *
* @return {@link Locale}
*/
Locale getLocale();
diff --git a/hutool-core/src/main/java/cn/hutool/core/date/format/DateParser.java b/hutool-core/src/main/java/cn/hutool/core/date/format/DateParser.java
index 27caf815f..db4f520d7 100644
--- a/hutool-core/src/main/java/cn/hutool/core/date/format/DateParser.java
+++ b/hutool-core/src/main/java/cn/hutool/core/date/format/DateParser.java
@@ -15,7 +15,7 @@ public interface DateParser extends DateBasic{
/**
* 将日期字符串解析并转换为 {@link Date} 对象
* 等价于 {@link java.text.DateFormat#parse(String)}
- *
+ *
* @param source 日期字符串
* @return {@link Date}
* @throws ParseException 转换异常,被转换的字符串格式错误。
@@ -25,7 +25,7 @@ public interface DateParser extends DateBasic{
/**
* 将日期字符串解析并转换为 {@link Date} 对象
* 等价于 {@link java.text.DateFormat#parse(String, ParsePosition)}
- *
+ *
* @param source 日期字符串
* @param pos {@link ParsePosition}
* @return {@link Date}
@@ -34,8 +34,8 @@ public interface DateParser extends DateBasic{
/**
* 根据给定格式转换日期字符串
- * Updates the Calendar with parsed fields. Upon success, the ParsePosition index is updated to indicate how much of the source text was consumed.
- * Not all source text needs to be consumed.
+ * Updates the Calendar with parsed fields. Upon success, the ParsePosition index is updated to indicate how much of the source text was consumed.
+ * Not all source text needs to be consumed.
* Upon parse failure, ParsePosition error index is updated to the offset of the source text which does not match the supplied format.
*
* @param source 被转换的日期字符串
@@ -48,7 +48,7 @@ public interface DateParser extends DateBasic{
/**
* 将日期字符串解析并转换为 {@link Date} 对象
- *
+ *
* @param source A String
whose beginning should be parsed.
* @return a java.util.Date
object
* @throws ParseException if the beginning of the specified string cannot be parsed.
@@ -58,7 +58,7 @@ public interface DateParser extends DateBasic{
/**
* 根据 {@link ParsePosition} 给定将日期字符串解析并转换为 {@link Date} 对象
- *
+ *
* @param source A String
whose beginning should be parsed.
* @param pos the parse position
* @return a java.util.Date
object
diff --git a/hutool-core/src/main/java/cn/hutool/core/date/format/FastDateFormat.java b/hutool-core/src/main/java/cn/hutool/core/date/format/FastDateFormat.java
index ef1f25f31..792c5ae80 100644
--- a/hutool-core/src/main/java/cn/hutool/core/date/format/FastDateFormat.java
+++ b/hutool-core/src/main/java/cn/hutool/core/date/format/FastDateFormat.java
@@ -22,7 +22,7 @@ import java.util.TimeZone;
* {@link #getTimeInstance(int, TimeZone, Locale)}
* {@link #getDateTimeInstance(int, int, TimeZone, Locale)}
*
* Formats a {@code Date}, {@code Calendar} or {@code Long} (milliseconds) object. *
- * + * * @param obj the object to format * @return The formatted value. */ @@ -347,10 +347,10 @@ public class FastDatePrinter extends AbstractDateBasic implements DatePrinter { } return applyRules(calendar, buf); } - + /** * Creates a String representation of the given Calendar by applying the rules of this printer to it. - * + * * @param c the Calender to apply the rules to. * @return a String representation of the given Calendar. */ diff --git a/hutool-core/src/main/java/cn/hutool/core/date/format/FormatCache.java b/hutool-core/src/main/java/cn/hutool/core/date/format/FormatCache.java index a9f7d5390..2cc136020 100644 --- a/hutool-core/src/main/java/cn/hutool/core/date/format/FormatCache.java +++ b/hutool-core/src/main/java/cn/hutool/core/date/format/FormatCache.java @@ -14,7 +14,7 @@ import java.util.concurrent.ConcurrentMap; /** * 日期格式化器缓存* Gets a date/time formatter instance using the specified style, time zone and locale. *
- * + * * @param dateStyle date style: FULL, LONG, MEDIUM, or SHORT, null indicates no date in format * @param timeStyle time style: FULL, LONG, MEDIUM, or SHORT, null indicates no time in format * @param timeZone optional time zone, overrides time zone of formatted date, null means use default Locale @@ -103,7 +103,7 @@ abstract class FormatCache* Gets a date/time formatter instance using the specified style, time zone and locale. *
- * + * * @param dateStyle date style: FULL, LONG, MEDIUM, or SHORT * @param timeStyle time style: FULL, LONG, MEDIUM, or SHORT * @param timeZone optional time zone, overrides time zone of formatted date, null means use default Locale @@ -120,7 +120,7 @@ abstract class FormatCache* Gets a date formatter instance using the specified style, time zone and locale. *
- * + * * @param dateStyle date style: FULL, LONG, MEDIUM, or SHORT * @param timeZone optional time zone, overrides time zone of formatted date, null means use default Locale * @param locale optional locale, overrides system locale @@ -136,7 +136,7 @@ abstract class FormatCache* Gets a time formatter instance using the specified style, time zone and locale. *
- * + * * @param timeStyle time style: FULL, LONG, MEDIUM, or SHORT * @param timeZone optional time zone, overrides time zone of formatted date, null means use default Locale * @param locale optional locale, overrides system locale @@ -152,7 +152,7 @@ abstract class FormatCache* Gets a date/time format for the specified styles and locale. *
- * + * * @param dateStyle date style: FULL, LONG, MEDIUM, or SHORT, null indicates no date in format * @param timeStyle time style: FULL, LONG, MEDIUM, or SHORT, null indicates no time in format * @param locale The non-null locale of the desired format diff --git a/hutool-core/src/main/java/cn/hutool/core/date/format/package-info.java b/hutool-core/src/main/java/cn/hutool/core/date/format/package-info.java index a224bfdb2..13fe57861 100644 --- a/hutool-core/src/main/java/cn/hutool/core/date/format/package-info.java +++ b/hutool-core/src/main/java/cn/hutool/core/date/format/package-info.java @@ -1,6 +1,6 @@ /** * 提供线程安全的日期格式的格式化和解析实现 - * + * * @author looly * */ diff --git a/hutool-core/src/main/java/cn/hutool/core/date/package-info.java b/hutool-core/src/main/java/cn/hutool/core/date/package-info.java index 19fdb597f..284d05321 100644 --- a/hutool-core/src/main/java/cn/hutool/core/date/package-info.java +++ b/hutool-core/src/main/java/cn/hutool/core/date/package-info.java @@ -1,6 +1,6 @@ /** * 日期封装,日期的核心为DateTime类,DateUtil提供日期操作的入口 - * + * * @author looly * */ diff --git a/hutool-core/src/main/java/cn/hutool/core/exceptions/DependencyException.java b/hutool-core/src/main/java/cn/hutool/core/exceptions/DependencyException.java index 23e6ccdb9..09591159e 100644 --- a/hutool-core/src/main/java/cn/hutool/core/exceptions/DependencyException.java +++ b/hutool-core/src/main/java/cn/hutool/core/exceptions/DependencyException.java @@ -4,7 +4,7 @@ import cn.hutool.core.util.StrUtil; /** * 依赖异常 - * + * * @author xiaoleilu * @since 4.0.10 */ diff --git a/hutool-core/src/main/java/cn/hutool/core/exceptions/NotInitedException.java b/hutool-core/src/main/java/cn/hutool/core/exceptions/NotInitedException.java index 6552ffabd..f2cc929aa 100644 --- a/hutool-core/src/main/java/cn/hutool/core/exceptions/NotInitedException.java +++ b/hutool-core/src/main/java/cn/hutool/core/exceptions/NotInitedException.java @@ -4,7 +4,7 @@ import cn.hutool.core.util.StrUtil; /** * 未初始化异常 - * + * * @author xiaoleilu */ public class NotInitedException extends RuntimeException { diff --git a/hutool-core/src/main/java/cn/hutool/core/exceptions/StatefulException.java b/hutool-core/src/main/java/cn/hutool/core/exceptions/StatefulException.java index 9a219f258..98c71e026 100644 --- a/hutool-core/src/main/java/cn/hutool/core/exceptions/StatefulException.java +++ b/hutool-core/src/main/java/cn/hutool/core/exceptions/StatefulException.java @@ -4,7 +4,7 @@ import cn.hutool.core.util.StrUtil; /** * 带有状态码的异常 - * + * * @author xiaoleilu * */ diff --git a/hutool-core/src/main/java/cn/hutool/core/exceptions/UtilException.java b/hutool-core/src/main/java/cn/hutool/core/exceptions/UtilException.java index c5fb56d29..4493db75c 100644 --- a/hutool-core/src/main/java/cn/hutool/core/exceptions/UtilException.java +++ b/hutool-core/src/main/java/cn/hutool/core/exceptions/UtilException.java @@ -12,19 +12,19 @@ public class UtilException extends RuntimeException{ public UtilException(Throwable e) { super(ExceptionUtil.getMessage(e), e); } - + public UtilException(String message) { super(message); } - + public UtilException(String messageTemplate, Object... params) { super(StrUtil.format(messageTemplate, params)); } - + public UtilException(String message, Throwable throwable) { super(message, throwable); } - + public UtilException(Throwable throwable, String messageTemplate, Object... params) { super(StrUtil.format(messageTemplate, params), throwable); } diff --git a/hutool-core/src/main/java/cn/hutool/core/exceptions/ValidateException.java b/hutool-core/src/main/java/cn/hutool/core/exceptions/ValidateException.java index ba8012f14..0d7f83e6c 100644 --- a/hutool-core/src/main/java/cn/hutool/core/exceptions/ValidateException.java +++ b/hutool-core/src/main/java/cn/hutool/core/exceptions/ValidateException.java @@ -4,7 +4,7 @@ import cn.hutool.core.util.StrUtil; /** * 验证异常 - * + * * @author xiaoleilu */ public class ValidateException extends StatefulException { @@ -16,7 +16,7 @@ public class ValidateException extends StatefulException { public ValidateException(String msg) { super(msg); } - + public ValidateException(String messageTemplate, Object... params) { super(StrUtil.format(messageTemplate, params)); }