Minor Javadoc cleanup

This commit is contained in:
Erik C. Thauvin 2023-04-06 11:02:46 -07:00
parent 51002b337f
commit bd0b504800
8 changed files with 42 additions and 48 deletions

View file

@ -23,6 +23,7 @@ public class PropertyFileExampleBuild extends Project {
version = version(0, 1, 0);
downloadSources = true;
autoDownloadPurge = true;
repositories = List.of(MAVEN_CENTRAL);
scope(test)
.include(dependency("org.junit.jupiter", "junit-jupiter", version(5, 9, 2)))

View file

@ -21,8 +21,8 @@ public class PropertyFileBuild extends Project {
javadocOptions
.docLint(NO_MISSING)
.link("https://rife2.github.io/rife2/");
// publishRepository = version.isSnapshot() ? repository("rife2-snapshot") : repository("rife2");
publishRepository = MAVEN_LOCAL;
publishRepository = version.isSnapshot() ? repository("rife2-snapshot") : repository("rife2");
// publishRepository = MAVEN_LOCAL;
publishInfo = new PublishInfo()
.groupId("com.uwyn.rife2")
.artifactId("bld-property-file")

View file

@ -19,7 +19,7 @@ package rife.bld.extension.propertyfile;
import java.util.function.BiFunction;
/**
* Declares the modifications to be made to a {@link java.util.Properties Properties} file.
* Declares the modifications to be made to a {@link java.util.Properties string-based property}.
*
* @author <a href="https://erik.thauvin.net/">Erik C. Thauvin</a>
* @author <a href="https://github.com/gbevin">Geert Bevin</a>
@ -31,7 +31,7 @@ public class Entry extends EntryBase {
}
/**
* Set the new {@link java.util.Properties property} value.
* Sets the new {@link java.util.Properties property} value.
*
* @param s The new value
*/

View file

@ -20,7 +20,7 @@ import java.util.function.BiFunction;
import java.util.function.IntFunction;
/**
* Declares the modifications to be made to a {@link java.util.Properties Properties} file.
* Declares the modifications to be made to a {@link java.util.Properties property}.
*
* @author <a href="https://erik.thauvin.net/">Erik C. Thauvin</a>
* @author <a href="https://github.com/gbevin">Geert Bevin</a>
@ -70,14 +70,14 @@ public class EntryBase {
}
/**
* Set the modify function.
* Sets the modify function.
*/
protected void setModify(BiFunction<String, String, String> modify) {
this.modify = modify;
}
/**
* Set the modify function.
* Sets the modify function.
*
* @param value the value to perform a modification with
*/
@ -87,14 +87,14 @@ public class EntryBase {
}
/**
* Returns {@code true} if the {@link EntryBase} is to be deleted.
* Returns {@code true} if the {@link java.util.Properties property} is to be deleted.
*/
protected boolean isDelete() {
return isDelete;
}
/**
* Sets whether the {@link EntryBase} should be deleted.
* Sets whether the {@link java.util.Properties property} should be deleted.
*/
protected void setDelete(boolean delete) {
isDelete = delete;
@ -138,7 +138,7 @@ public class EntryBase {
}
/**
* <p>Sets the initial value to set the {@link java.util.Properties property} to, if not already defined.</p>
* Sets the initial value to set the {@link java.util.Properties property} to, if not already defined.
*
* @param defaultValue the default value
*/
@ -164,14 +164,14 @@ public class EntryBase {
}
/**
* Return the {@link EntryDate.Units unit}.
* Returns the {@link EntryDate.Units unit}.
*/
protected EntryDate.Units getUnit() {
return unit;
}
/**
* Sets the {@link EntryDate.Units unit} value to apply to calculations for {@link EntryDate}.
* Sets the {@link EntryDate.Units unit} value to apply to calculations.
*
* @param unit the {@link EntryDate.Units unit}
*/
@ -198,7 +198,7 @@ public class EntryBase {
}
/**
* Set a new value for {@link java.util.Properties property}.
* Sets a new value for {@link java.util.Properties property}.
*
* @param newValue the new value
*/

View file

@ -22,7 +22,7 @@ import java.util.Date;
import java.util.function.IntFunction;
/**
* Declares the modifications to be made to a {@link java.util.Properties Properties} file.
* Declares the modifications to be made to a {@link java.util.Properties date-based property}.
*
* @author <a href="https://erik.thauvin.net/">Erik C. Thauvin</a>
* @since 1.0
@ -38,9 +38,9 @@ public class EntryDate extends EntryBase {
}
/**
* Set the new {@link java.util.Properties property} value to an {@link Instant}
* Sets the new {@link java.util.Properties property} value to an {@link Instant}
*
* @param instant the {@link Instant} to set the value to.
* @param instant the {@link Instant} to set the value to
*/
public EntryDate set(Instant instant) {
setNewValue(instant);
@ -48,9 +48,9 @@ public class EntryDate extends EntryBase {
}
/**
* Set the new {@link java.util.Properties property} value to an {@link LocalDate}
* Sets the new {@link java.util.Properties property} value to an {@link LocalDate}
*
* @param date the {@link LocalDate} to set the value to.
* @param date the {@link LocalDate} to set the value to
*/
public EntryDate set(LocalDate date) {
setNewValue(date);
@ -58,9 +58,9 @@ public class EntryDate extends EntryBase {
}
/**
* Set the new {@link java.util.Properties property} value to an {@link LocalDateTime}
* Sets the new {@link java.util.Properties property} value to a {@link LocalDateTime}
*
* @param date the {@link LocalDateTime} to set the value to.
* @param date the {@link LocalDateTime} to set the value to
*/
public EntryDate set(LocalDateTime date) {
setNewValue(date);
@ -68,9 +68,9 @@ public class EntryDate extends EntryBase {
}
/**
* Set the new {@link java.util.Properties property} value to an {@link ZonedDateTime}
* Sets the new {@link java.util.Properties property} value to a {@link ZonedDateTime}
*
* @param date the {@link ZonedDateTime} to set the value to.
* @param date the {@link ZonedDateTime} to set the value to
*/
public EntryDate set(ZonedDateTime date) {
setNewValue(date);
@ -78,9 +78,9 @@ public class EntryDate extends EntryBase {
}
/**
* Set the new {@link java.util.Properties property} value to an {@link LocalTime}
* Sets the new {@link java.util.Properties property} value to a {@link LocalTime}
*
* @param time the {@link LocalTime} to set the value to.
* @param time the {@link LocalTime} to set the value to
*/
public EntryDate set(LocalTime time) {
setNewValue(time);
@ -88,9 +88,9 @@ public class EntryDate extends EntryBase {
}
/**
* Set the new {@link java.util.Properties property} value to an {@link Calendar}
* Sets the new {@link java.util.Properties property} value to a {@link Calendar}
*
* @param cal the {@link Calendar} to set the value to.
* @param cal the {@link Calendar} to set the value to
*/
public EntryDate set(Calendar cal) {
setNewValue(cal);
@ -98,9 +98,9 @@ public class EntryDate extends EntryBase {
}
/**
* Set the new {@link java.util.Properties property} value to an {@link Date}
* Sets the new {@link java.util.Properties property} value to a {@link Date}
*
* @param date the {@link Date} to set the value to.
* @param date the {@link Date} to set the value to
*/
public EntryDate set(Date date) {
setNewValue(date);
@ -108,7 +108,7 @@ public class EntryDate extends EntryBase {
}
/**
* Sets the new value to now.
* Sets the new {@link java.util.Properties property} value to now.
*/
public EntryDate now() {
setNewValue("now");
@ -118,7 +118,7 @@ public class EntryDate extends EntryBase {
/**
* Creates a new {@link EntryDate entry}.
*
* @param calc the calculation function.
* @param calc the calculation function
*/
public EntryDate calc(IntFunction<Integer> calc) {
setCalc(calc);
@ -126,9 +126,8 @@ public class EntryDate extends EntryBase {
}
/**
* <p>Sets the pattern for {@link EntryInt} and {@link EntryDate} to
* {@link java.text.DecimalFormat DecimalFormat} and {@link java.time.format.DateTimeFormatter DateTimeFormatter}
* respectively.</p>
* Sets the pattern for {@link EntryInt} and {@link EntryDate} to{@link java.text.DecimalFormat DecimalFormat} and
* {@link java.time.format.DateTimeFormatter DateTimeFormatter} respectively.
*
* @param pattern the pattern
*/

View file

@ -19,7 +19,7 @@ package rife.bld.extension.propertyfile;
import java.util.function.IntFunction;
/**
* Declares the modifications to be made to a {@link java.util.Properties Properties} file.
* Declares the modifications to be made to a {@link java.util.Properties integer-based property}.
*
* @author <a href="https://erik.thauvin.net/">Erik C. Thauvin</a>
* @since 1.0
@ -35,9 +35,9 @@ public class EntryInt extends EntryBase {
}
/**
* Set the new {@link java.util.Properties property} value to an integer.
* Sets the new {@link java.util.Properties property} value to an integer.
*
* @param i The integer to set the value to.
* @param i The integer to set the value to
*/
public EntryInt set(int i) {
setNewValue(i);
@ -45,7 +45,7 @@ public class EntryInt extends EntryBase {
}
/**
* <p>Sets the initial value to set the {@link java.util.Properties property} to, if not already defined.</p>
* Sets the initial value to set the {@link java.util.Properties property} to, if not already defined.
*
* @param defaultValue the default value
*/

View file

@ -76,9 +76,9 @@ public class PropertyFileOperation extends AbstractOperation<PropertyFileOperati
}
/**
* Sets the command to return a failure on any warnings.
* Sets the {@link #execute() execution} to return a failure on any warnings.
*
* @param failOnWarning if set to {@code true}, the task will fail on any warnings.
* @param failOnWarning if set to {@code true}, the execution will fail on any warnings.
*/
@SuppressWarnings("unused")
public PropertyFileOperation failOnWarning(boolean failOnWarning) {

View file

@ -32,9 +32,8 @@ import java.util.Properties;
import java.util.logging.Level;
import java.util.logging.Logger;
/**
* Collection of utility-type methods commonly used in this project.
* Collection of common methods used in this project.
*
* @author <a href="https://erik.thauvin.net/">Erik C. Thauvin</a>
* @since 1.0
@ -52,7 +51,6 @@ public final class PropertyFileUtils {
* @param command the issuing command
* @param p the {@link Properties property}
* @param entry the {@link Entry} containing the {@link Properties property} edits
* @return {@code true} if successful
*/
public static boolean processDate(String command, Properties p, EntryDate entry, boolean failOnWarning)
throws Exception {
@ -154,7 +152,6 @@ public final class PropertyFileUtils {
* @param value the value
* @param newValue the new value
* @param defaultValue the default value
* @return the current value
*/
public static Object currentValue(String value, Object defaultValue, Object newValue) {
if (newValue != null) {
@ -172,7 +169,6 @@ public final class PropertyFileUtils {
* @param command the issuing command
* @param p the {@link Properties property}
* @param entry the {@link Entry} containing the {@link Properties property} edits
* @return {@code true} if successful
*/
public static boolean processInt(String command, Properties p, EntryInt entry, boolean failOnWarning)
throws Exception {
@ -205,7 +201,6 @@ public final class PropertyFileUtils {
*
* @param p the {@link Properties property}
* @param entry the {@link Entry} containing the {@link Properties property} edits
* @return {@code true} if successful
*/
public static boolean processString(Properties p, Entry entry) {
var value = PropertyFileUtils.currentValue(p.getProperty(entry.getKey()), entry.getDefaultValue(),
@ -238,7 +233,7 @@ public final class PropertyFileUtils {
* @param command The command name
* @param message the message log
* @param e the related exception
* @param failOnWarning skips logging the exception if set to {@code false}
* @param failOnWarning logs and throws exception if set to {@code true}
*/
static void warn(String command, String message, Exception e, boolean failOnWarning) throws Exception {
if (failOnWarning) {
@ -253,9 +248,8 @@ public final class PropertyFileUtils {
* Loads a {@link Properties properties} file.
*
* @param command the issuing command
* @param file the file location.
* @param file the file location
* @param p the {@link Properties properties} to load into.
* @return {@code true} if successful
*/
public static boolean loadProperties(String command, File file, Properties p) throws Exception {
boolean success = true;