docs(global): Optimised javadocs.

This commit is contained in:
Zihlu Wang
2023-09-15 15:36:25 +08:00
parent baa91f626a
commit 6549373e8d
46 changed files with 177 additions and 214 deletions
@@ -18,17 +18,14 @@
package cn.org.codecrafters.guid;
/**
* <p>
* The {@code GuidCreator} is a generic interface for generating globally unique
* identifiers (GUIDs) of a specific type.
*
* <p>
* The type of ID is determined by the class implementing this interface.
*
*
* @param <IdType> this represents the type of the Global Unique Identifier
* @author Zihlu Wang
* @version 1.0.0
* @version 1.1.0
* @since 1.0.0
*/
public interface GuidCreator<IdType> {
@@ -23,9 +23,7 @@ import java.time.LocalDateTime;
import java.time.ZoneOffset;
/**
* <p>
* 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 center ID to
@@ -38,7 +36,6 @@ import java.time.ZoneOffset;
* <li>5 bits for worker ID</li>
* <li>12 bits for sequence number (per millisecond)</li>
* </ul>
*
* <p>
* When initializing the SnowflakeGuidCreator, you must provide the worker ID
* and data center ID, ensuring they are within the valid range defined by the
@@ -48,7 +45,7 @@ import java.time.ZoneOffset;
* repeated timestamps.
*
* @author Zihlu Wang
* @version 1.0.0
* @version 1.1.0
* @since 1.0.0
*/
public final class SnowflakeGuidCreator implements GuidCreator<Long> {
@@ -18,27 +18,22 @@
package cn.org.codecrafters.guid.exceptions;
/**
* <p>
* The TimingException class represents an exception that is thrown when there
* is an error related to time sequence.
*
* <p>
* This class extends the RuntimeException class, which means that instances of
* TimingException do not need to be declared in a method or constructor's
* throws clause.
*
* <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
* represents the underlying cause of the exception and provides additional
* information about the error.
*
* <p>
* TimingException is typically used to handle exceptions related to timing,
* such as timeouts or synchronization issues. It is a subclass of
* RuntimeException, which means it is an unchecked exception and does not need
* to be caught or declared.
*
*
* @author Zihlu Wang
* @since 1.0.0
@@ -16,17 +16,14 @@
*/
/**
* <p>
* This package contains the custom exception classes related to GUID
* generation. These exceptions are thrown when there are issues or errors
* during the generation or processing of global unique identifiers (GUIDs).
*
* <p>
* The main exception class in this package is {@link
* cn.org.codecrafters.guid.exceptions.TimingException}, which is a runtime
* exception and serves as the base exception for all other custom exceptions
* related to GUID generation.
*
* <p>
* Custom exceptions in this package provide specific information about the
* type of error that occurred during GUID generation, making it easier for
@@ -34,7 +31,6 @@
* GUIDs. They are designed to enhance the robustness and reliability of the
* GUID generation process by providing clear and meaningful error messages to
* the developers.
*
* <p>
* Developers using the GUID generation module should be aware of the possible
* exceptions that can be thrown and handle them appropriately to ensure smooth
@@ -16,15 +16,12 @@
*/
/**
* <p>
* The package provides a set of tools for generating globally unique
* identifiers (GUIDs).
*
* <p>
* The goal of this library is to provide an efficient, reliable way to
* generate globally unique identifiers without requiring any specific
* environment or configuration.
*
* <p>
* Key features include:
* <ul>