docs(global): Optimised javadoc, changed the spelling to British English.

This commit is contained in:
Zihlu Wang
2023-09-18 15:04:10 +08:00
parent fee85d5d84
commit f80c47e8ad
41 changed files with 459 additions and 438 deletions
@@ -24,12 +24,10 @@ import java.time.ZoneId;
import java.time.ZoneOffset;
/**
* SnowflakeGuidCreator - GUID generator based on the Snowflake algorithm.
* <p>
* The SnowflakeGuidCreator generates unique identifiers using the Snowflake
* algorithm, which combines a timestamp, worker ID, and data centre ID to
* create 64-bit long integers. The bit distribution for the generated IDs is
* as follows:
* The {@code SnowflakeGuidCreator} generates unique identifiers using the
* Snowflake algorithm, which combines a timestamp, worker ID, and data centre
* ID to create 64-bit long integers. The bit distribution for the generated
* IDs is as follows:
* <ul>
* <li>1 bit for sign</li>
* <li>41 bits for timestamp (in milliseconds)</li>
@@ -38,10 +36,10 @@ import java.time.ZoneOffset;
* <li>12 bits for sequence number (per millisecond)</li>
* </ul>
* <p>
* When initializing the SnowflakeGuidCreator, you must provide the worker ID
* and data centre ID, ensuring they are within the valid range defined by the
* bit size. The generator maintains an internal sequence number that
* increments for IDs generated within the same millisecond. If the system
* When initializing a {@link SnowflakeGuidCreator}, you must provide the
* worker ID and data centre ID, ensuring they are within the valid range
* defined by the bit size. The generator maintains an internal sequence number
* that increments for IDs generated within the same millisecond. If the system
* clock moves backward, an exception is thrown to prevent generating IDs with
* repeated timestamps.
*
@@ -18,8 +18,8 @@
package cn.org.codecrafters.guid.exceptions;
/**
* The TimingException class represents an exception that is thrown when there
* is an error related to time sequence.
* The {@code TimingException} class represents an exception that is thrown
* when there is an error related to time sequence.
* <p>
* Instances of TimingException can be created with or without a message and a
* cause. The message provides a description of the exception, while the cause
@@ -40,9 +40,9 @@ public class TimingException extends RuntimeException {
/**
* A custom exception that is thrown when there is an issue with timing or
* scheduling with customized error message.
* scheduling with customised error message.
*
* @param message customized message
* @param message customised message
*/
public TimingException(String message) {
super(message);
@@ -50,9 +50,9 @@ public class TimingException extends RuntimeException {
/**
* A custom exception that is thrown when there is an issue with timing or
* scheduling with customized error message.
* scheduling with customised error message.
*
* @param message customized message
* @param message customised message
* @param cause the cause of this exception
*/
public TimingException(String message, Throwable cause) {
@@ -61,7 +61,7 @@ public class TimingException extends RuntimeException {
/**
* A custom exception that is thrown when there is an issue with timing or
* scheduling with customized error message.
* scheduling with customised error message.
*
* @param cause the cause of this exception
*/