Skip to content

Commit

Permalink
docs(utils): javadoc
Browse files Browse the repository at this point in the history
  • Loading branch information
WakelessSloth56 committed Mar 31, 2022
1 parent cce0c0a commit d50b272
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 14 deletions.
3 changes: 3 additions & 0 deletions src/main/java/org/auioc/mods/arnicalib/utils/Loggers.java
Expand Up @@ -4,6 +4,9 @@
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;

/**
* @deprecated Use {@link LogUtil} instead
*/
@Deprecated
public class Loggers {
public static final Logger logger = LogManager.getLogger();
Expand Down
Expand Up @@ -55,15 +55,15 @@ static LocalPlayer getLocalPlayerOrException(CommandSourceStack sourceStack) thr
}

/**
* @param nodes List of {@link ParsedCommandNode}s, from {@link CommandContext#getNodes()}
* @param nodeList List of {@link ParsedCommandNode}s, from {@link CommandContext#getNodes()}
* @param fromIndex
* @param toIndex
* @param conventToSnakeCase
* @return String that concatenates the literals (or in its snake case) of all (or some of) {@link LiteralCommandNode}s in the {@link ParsedCommandNode} list, separated by dots
* @since 5.1.1
*/
static String joinLiteralNodes(List<ParsedCommandNode<CommandSourceStack>> nodes, int fromIndex, int toIndex, boolean conventToSnakeCase) {
return nodes
static String joinLiteralNodes(List<ParsedCommandNode<CommandSourceStack>> nodeList, int fromIndex, int toIndex, boolean conventToSnakeCase) {
return nodeList
.subList(fromIndex, toIndex)
.stream()
.map(ParsedCommandNode::getNode)
Expand Down
Expand Up @@ -3,6 +3,9 @@
import net.minecraft.network.chat.Component;
import net.minecraft.network.chat.TranslatableComponent;

/**
* @deprecated Use {@link TextUtils} instead
*/
@Deprecated(since = "3.1.3")
public interface I18nUtils {
static Component getTranslatedText(String key) {
Expand Down
Expand Up @@ -22,7 +22,8 @@ public static <T extends IForgeRegistryEntry<T>> List<T> getAllRegistryObjects(D
}

/**
* For special use only, please use {@link org.auioc.mods.arnicalib.utils.game.RegistryUtils#getAllRegistryObjects(DeferredRegister)} instead generally.
* For special use only,
* please use {@link org.auioc.mods.arnicalib.utils.game.RegistryUtils#getAllRegistryObjects(DeferredRegister)} instead generally.
*/
@SuppressWarnings("unchecked")
public static <T extends IForgeRegistryEntry<? super T>> List<T> getAllRegistryObjects(Class<? extends IHRegistry> clazz, Class<T> type) {
Expand Down
20 changes: 10 additions & 10 deletions src/main/java/org/auioc/mods/arnicalib/utils/java/Validate.java
Expand Up @@ -115,8 +115,8 @@ public static void isNonPositive(double value) {
* Validate that the specified primitive value is in the specified interval; otherwise, throws an exception.
*
* @param interval
* @param value the value to validate
* @param message the exception message if invalid
* @param value the value to validate
* @param message the exception message if invalid
* @throws IllegalArgumentException if the value is not in the interval
* @see #isInInterval(Range, double, String)
*/
Expand All @@ -136,7 +136,7 @@ public static void isInInterval(Range<Double> interval, double value, String mes
/**
* Validate that the specified bounds are valid the interval bounds; otherwise, throws an exception.
*
* @param left the interval left bound
* @param left the interval left bound
* @param right the interval right bound
*/
public static void isBoundedInterval(long left, long right) {
Expand All @@ -157,7 +157,7 @@ public static void isBoundedInterval(double left, double right) {
/**
* Validate that the specified primitive value is in the interval <b>(left, right)</b>; otherwise, throws an exception.
*
* @param left the interval left bound
* @param left the interval left bound
* @param right the interval right bound
* @param value the value to validate
* @throws IllegalArgumentException if the value is not in the interval
Expand All @@ -171,7 +171,7 @@ public static void isInOpenInterval(long left, long right, long value) {
/**
* Validate that the specified primitive value is in the interval <b>[left, right]</b>; otherwise, throws an exception.
*
* @param left the interval left bound
* @param left the interval left bound
* @param right the interval right bound
* @param value the value to validate
* @throws IllegalArgumentException if the value is not in the interval
Expand All @@ -185,7 +185,7 @@ public static void isInCloseInterval(long left, long right, long value) {
/**
* Validate that the specified primitive value is in the interval <b>(left, right]</b>; otherwise, throws an exception.
*
* @param left the interval left bound
* @param left the interval left bound
* @param right the interval right bound
* @param value the value to validate
* @throws IllegalArgumentException if the value is not in the interval
Expand All @@ -199,7 +199,7 @@ public static void isInOpenCloseInterval(long left, long right, long value) {
/**
* Validate that the specified primitive value is in the interval <b>[left, right)</b>; otherwise, throws an exception.
*
* @param left the interval left bound
* @param left the interval left bound
* @param right the interval right bound
* @param value the value to validate
* @throws IllegalArgumentException if the value is not in the interval
Expand All @@ -213,7 +213,7 @@ public static void isInCloseOpenInterval(long left, long right, long value) {
/**
* Validate that the specified primitive value is in the interval <b>(left, +∞)</b>; otherwise, throws an exception.
*
* @param left the interval left bound
* @param left the interval left bound
* @param value the value to validate
* @throws IllegalArgumentException if the value is not in the interval
* @see #isInLeftOpenInterval(double, double)
Expand All @@ -225,7 +225,7 @@ public static void isInLeftOpenInterval(long left, long value) {
/**
* Validate that the specified primitive value is in the interval <b>[left, +∞)</b>; otherwise, throws an exception.
*
* @param left the interval left bound
* @param left the interval left bound
* @param value the value to validate
* @throws IllegalArgumentException if the value is not in the interval
* @see #isInLeftClosedInterval(double, double)
Expand Down Expand Up @@ -261,7 +261,7 @@ public static void isInRightClosedInterval(long right, long value) {
/**
* Validate that the specified primitive value is in the interval <b>(right, left)</b>; it always throws an exception.
*
* @param left the interval left bound
* @param left the interval left bound
* @param right the interval right bound
* @param value the value to validate
* @throws IllegalArgumentException if the value is not in the interval
Expand Down

0 comments on commit d50b272

Please sign in to comment.