- * '你' =》\u4f60 + * 你 =》 \u4f60 ** * @param value int值,也可以是char @@ -278,7 +278,7 @@ public class HexUtil { * 转换的字符串如果u后不足4位,则前面用0填充,例如: * *
- * '你' =》'\u4f60' + * 你 =》 \u4f60 ** * @param ch char值 diff --git a/hutool-core/src/main/java/cn/hutool/core/codec/binary/Base16Codec.java b/hutool-core/src/main/java/cn/hutool/core/codec/binary/Base16Codec.java index 715a6a5cb..3fa9dc553 100644 --- a/hutool-core/src/main/java/cn/hutool/core/codec/binary/Base16Codec.java +++ b/hutool-core/src/main/java/cn/hutool/core/codec/binary/Base16Codec.java @@ -81,7 +81,7 @@ public class Base16Codec implements Encoder
- * 官方实现:https://github.com/jandrewrogers/MetroHash
- * 官方文档:http://www.jandrewrogers.com/2015/05/27/metrohash/
- * Go语言实现:https://github.com/linvon/cuckoo-filter/blob/main/vendor/github.com/dgryski/go-metro/
- *
- * @author li
- */
-public class MetroHash implements Hash64
+ * 官方实现:https://github.com/jandrewrogers/MetroHash
+ * 官方文档:http://www.jandrewrogers.com/2015/05/27/metrohash/
+ * 来自:https://github.com/postamar/java-metrohash/
+ *
+ * @author Marius Posta
+ * @param
+ * 官方实现:https://github.com/jandrewrogers/MetroHash
+ * 官方文档:http://www.jandrewrogers.com/2015/05/27/metrohash/
+ * 来自:https://github.com/postamar/java-metrohash/
+ *
+ * @param
+ * 官方实现:https://github.com/jandrewrogers/MetroHash
+ * 官方文档:http://www.jandrewrogers.com/2015/05/27/metrohash/
+ * 来自:https://github.com/postamar/java-metrohash/
+ * @author Marius Posta
+ */
+public class MetroHash128 extends AbstractMetroHash
+ * 官方实现:https://github.com/jandrewrogers/MetroHash
+ * 官方文档:http://www.jandrewrogers.com/2015/05/27/metrohash/
+ * 来自:https://github.com/postamar/java-metrohash/
+ * @author Marius Posta
+ */
+public class MetroHash64 extends AbstractMetroHash
+ * 参考:https://github.com/postamar/java-metrohash
+ *
+ * @author postamar, looly
+ */
+package cn.hutool.core.codec.hash.metro;
diff --git a/hutool-core/src/main/java/cn/hutool/core/collection/iter/LineIter.java b/hutool-core/src/main/java/cn/hutool/core/collection/iter/LineIter.java
index c22c4cce7..9933dfb53 100644
--- a/hutool-core/src/main/java/cn/hutool/core/collection/iter/LineIter.java
+++ b/hutool-core/src/main/java/cn/hutool/core/collection/iter/LineIter.java
@@ -95,6 +95,7 @@ public class LineIter extends ComputeIter
* see: http://git.oschina.net/yu120/sequence
* @author lry, looly
*/
diff --git a/hutool-core/src/main/java/cn/hutool/core/date/format/FastDatePrinter.java b/hutool-core/src/main/java/cn/hutool/core/date/format/FastDatePrinter.java
index 1d23e0389..11170f4ad 100644
--- a/hutool-core/src/main/java/cn/hutool/core/date/format/FastDatePrinter.java
+++ b/hutool-core/src/main/java/cn/hutool/core/date/format/FastDatePrinter.java
@@ -573,17 +573,11 @@ public class FastDatePrinter extends SimpleDateBasic implements DatePrinter {
mValue = value;
}
- /**
- * {@inheritDoc}
- */
@Override
public int estimateLength() {
return mValue.length();
}
- /**
- * {@inheritDoc}
- */
@Override
public void appendTo(final Appendable buffer, final Calendar calendar) throws IOException {
buffer.append(mValue);
@@ -610,9 +604,6 @@ public class FastDatePrinter extends SimpleDateBasic implements DatePrinter {
mValues = values;
}
- /**
- * {@inheritDoc}
- */
@Override
public int estimateLength() {
int max = 0;
@@ -625,9 +616,6 @@ public class FastDatePrinter extends SimpleDateBasic implements DatePrinter {
return max;
}
- /**
- * {@inheritDoc}
- */
@Override
public void appendTo(final Appendable buffer, final Calendar calendar) throws IOException {
buffer.append(mValues[calendar.get(mField)]);
@@ -651,25 +639,16 @@ public class FastDatePrinter extends SimpleDateBasic implements DatePrinter {
mField = field;
}
- /**
- * {@inheritDoc}
- */
@Override
public int estimateLength() {
return 4;
}
- /**
- * {@inheritDoc}
- */
@Override
public void appendTo(final Appendable buffer, final Calendar calendar) throws IOException {
appendTo(buffer, calendar.get(mField));
}
- /**
- * {@inheritDoc}
- */
@Override
public final void appendTo(final Appendable buffer, final int value) throws IOException {
if (value < 10) {
@@ -697,25 +676,16 @@ public class FastDatePrinter extends SimpleDateBasic implements DatePrinter {
UnpaddedMonthField() {
}
- /**
- * {@inheritDoc}
- */
@Override
public int estimateLength() {
return 2;
}
- /**
- * {@inheritDoc}
- */
@Override
public void appendTo(final Appendable buffer, final Calendar calendar) throws IOException {
appendTo(buffer, calendar.get(Calendar.MONTH) + 1);
}
- /**
- * {@inheritDoc}
- */
@Override
public final void appendTo(final Appendable buffer, final int value) throws IOException {
if (value < 10) {
@@ -750,25 +720,16 @@ public class FastDatePrinter extends SimpleDateBasic implements DatePrinter {
mSize = size;
}
- /**
- * {@inheritDoc}
- */
@Override
public int estimateLength() {
return mSize;
}
- /**
- * {@inheritDoc}
- */
@Override
public void appendTo(final Appendable buffer, final Calendar calendar) throws IOException {
appendTo(buffer, calendar.get(mField));
}
- /**
- * {@inheritDoc}
- */
@Override
public final void appendTo(final Appendable buffer, final int value) throws IOException {
appendFullDigits(buffer, value, mSize);
@@ -792,25 +753,16 @@ public class FastDatePrinter extends SimpleDateBasic implements DatePrinter {
mField = field;
}
- /**
- * {@inheritDoc}
- */
@Override
public int estimateLength() {
return 2;
}
- /**
- * {@inheritDoc}
- */
@Override
public void appendTo(final Appendable buffer, final Calendar calendar) throws IOException {
appendTo(buffer, calendar.get(mField));
}
- /**
- * {@inheritDoc}
- */
@Override
public final void appendTo(final Appendable buffer, final int value) throws IOException {
if (value < 100) {
@@ -835,25 +787,16 @@ public class FastDatePrinter extends SimpleDateBasic implements DatePrinter {
TwoDigitYearField() {
}
- /**
- * {@inheritDoc}
- */
@Override
public int estimateLength() {
return 2;
}
- /**
- * {@inheritDoc}
- */
@Override
public void appendTo(final Appendable buffer, final Calendar calendar) throws IOException {
appendTo(buffer, calendar.get(Calendar.YEAR) % 100);
}
- /**
- * {@inheritDoc}
- */
@Override
public final void appendTo(final Appendable buffer, final int value) throws IOException {
appendDigits(buffer, value);
@@ -874,25 +817,16 @@ public class FastDatePrinter extends SimpleDateBasic implements DatePrinter {
TwoDigitMonthField() {
}
- /**
- * {@inheritDoc}
- */
@Override
public int estimateLength() {
return 2;
}
- /**
- * {@inheritDoc}
- */
@Override
public void appendTo(final Appendable buffer, final Calendar calendar) throws IOException {
appendTo(buffer, calendar.get(Calendar.MONTH) + 1);
}
- /**
- * {@inheritDoc}
- */
@Override
public final void appendTo(final Appendable buffer, final int value) throws IOException {
appendDigits(buffer, value);
@@ -916,17 +850,11 @@ public class FastDatePrinter extends SimpleDateBasic implements DatePrinter {
mRule = rule;
}
- /**
- * {@inheritDoc}
- */
@Override
public int estimateLength() {
return mRule.estimateLength();
}
- /**
- * {@inheritDoc}
- */
@Override
public void appendTo(final Appendable buffer, final Calendar calendar) throws IOException {
int value = calendar.get(Calendar.HOUR);
@@ -936,9 +864,6 @@ public class FastDatePrinter extends SimpleDateBasic implements DatePrinter {
mRule.appendTo(buffer, value);
}
- /**
- * {@inheritDoc}
- */
@Override
public void appendTo(final Appendable buffer, final int value) throws IOException {
mRule.appendTo(buffer, value);
@@ -962,17 +887,11 @@ public class FastDatePrinter extends SimpleDateBasic implements DatePrinter {
mRule = rule;
}
- /**
- * {@inheritDoc}
- */
@Override
public int estimateLength() {
return mRule.estimateLength();
}
- /**
- * {@inheritDoc}
- */
@Override
public void appendTo(final Appendable buffer, final Calendar calendar) throws IOException {
int value = calendar.get(Calendar.HOUR_OF_DAY);
@@ -982,9 +901,6 @@ public class FastDatePrinter extends SimpleDateBasic implements DatePrinter {
mRule.appendTo(buffer, value);
}
- /**
- * {@inheritDoc}
- */
@Override
public void appendTo(final Appendable buffer, final int value) throws IOException {
mRule.appendTo(buffer, value);
@@ -1103,9 +1019,6 @@ public class FastDatePrinter extends SimpleDateBasic implements DatePrinter {
mDaylight = getTimeZoneDisplay(timeZone, true, style, locale);
}
- /**
- * {@inheritDoc}
- */
@Override
public int estimateLength() {
// We have no access to the Calendar object that will be passed to
@@ -1114,9 +1027,6 @@ public class FastDatePrinter extends SimpleDateBasic implements DatePrinter {
return Math.max(mStandard.length(), mDaylight.length());
}
- /**
- * {@inheritDoc}
- */
@Override
public void appendTo(final Appendable buffer, final Calendar calendar) throws IOException {
final TimeZone zone = calendar.getTimeZone();
@@ -1148,17 +1058,11 @@ public class FastDatePrinter extends SimpleDateBasic implements DatePrinter {
mColon = colon;
}
- /**
- * {@inheritDoc}
- */
@Override
public int estimateLength() {
return 5;
}
- /**
- * {@inheritDoc}
- */
@Override
public void appendTo(final Appendable buffer, final Calendar calendar) throws IOException {
@@ -1227,17 +1131,11 @@ public class FastDatePrinter extends SimpleDateBasic implements DatePrinter {
this.length = length;
}
- /**
- * {@inheritDoc}
- */
@Override
public int estimateLength() {
return length;
}
- /**
- * {@inheritDoc}
- */
@Override
public void appendTo(final Appendable buffer, final Calendar calendar) throws IOException {
int offset = calendar.get(Calendar.ZONE_OFFSET) + calendar.get(Calendar.DST_OFFSET);
@@ -1298,17 +1196,11 @@ public class FastDatePrinter extends SimpleDateBasic implements DatePrinter {
mLocale = locale;
}
- /**
- * {@inheritDoc}
- */
@Override
public int hashCode() {
return (mStyle * 31 + mLocale.hashCode()) * 31 + mTimeZone.hashCode();
}
- /**
- * {@inheritDoc}
- */
@Override
public boolean equals(final Object obj) {
if (this == obj) {
diff --git a/hutool-core/src/main/java/cn/hutool/core/io/AppendableWriter.java b/hutool-core/src/main/java/cn/hutool/core/io/AppendableWriter.java
index 25b966d54..e339f6fce 100644
--- a/hutool-core/src/main/java/cn/hutool/core/io/AppendableWriter.java
+++ b/hutool-core/src/main/java/cn/hutool/core/io/AppendableWriter.java
@@ -19,6 +19,11 @@ public class AppendableWriter extends Writer implements Appendable {
private final boolean flushable;
private boolean closed;
+ /**
+ * 构造
+ *
+ * @param appendable {@link Appendable}
+ */
public AppendableWriter(final Appendable appendable) {
this.appendable = appendable;
this.flushable = appendable instanceof Flushable;
diff --git a/hutool-core/src/main/java/cn/hutool/core/io/file/visitor/DelVisitor.java b/hutool-core/src/main/java/cn/hutool/core/io/file/visitor/DelVisitor.java
index aee176854..a167ad627 100644
--- a/hutool-core/src/main/java/cn/hutool/core/io/file/visitor/DelVisitor.java
+++ b/hutool-core/src/main/java/cn/hutool/core/io/file/visitor/DelVisitor.java
@@ -1,7 +1,5 @@
package cn.hutool.core.io.file.visitor;
-import cn.hutool.core.lang.Console;
-
import java.io.IOException;
import java.nio.file.FileVisitResult;
import java.nio.file.Files;
@@ -17,6 +15,9 @@ import java.nio.file.attribute.BasicFileAttributes;
*/
public class DelVisitor extends SimpleFileVisitor
+ *
*
+ * @param intValue 季度int表示
+ * @return {@code Quarter}
* @see #Q1
* @see #Q2
* @see #Q3
* @see #Q4
- *
- * @param intValue 季度int表示
- * @return {@link Quarter}
*/
public static Quarter of(final int intValue) {
switch (intValue) {
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 5f9cf30f7..dd6f960e9 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,7 +11,7 @@ import java.util.concurrent.TimeUnit;
* System.currentTimeMillis()的调用比new一个普通对象要耗时的多(具体耗时高出多少我还没测试过,有人说是100倍左右)
* System.currentTimeMillis()之所以慢是因为去跟系统打了一次交道
* 后台定时更新时钟,JVM退出时,线程自动回收
- *
+ *
*
*
* @param bound 边界
* @return 位置
*/
+ @SuppressWarnings("ComparatorMethodParameterNotUsed")
@Override
public int compareTo(final Bound