SUB = Calc::sub;
@@ -38,6 +44,7 @@ public final class Calc {
* Adds {@code 1} to the value.
*
* @param v the value
+ * @return the new value
*/
public static Integer add(int v) {
return v + 1;
@@ -47,6 +54,7 @@ public final class Calc {
* Subtracts {@code 1} to the value.
*
* @param v the value
+ * @return the new value
*/
public static Integer sub(int v) {
return v - 1;
diff --git a/src/main/java/rife/bld/extension/propertyfile/Entry.java b/src/main/java/rife/bld/extension/propertyfile/Entry.java
index dc1c1db..e737c82 100644
--- a/src/main/java/rife/bld/extension/propertyfile/Entry.java
+++ b/src/main/java/rife/bld/extension/propertyfile/Entry.java
@@ -26,6 +26,11 @@ import java.util.function.BiFunction;
* @since 1.0
*/
public class Entry extends EntryBase {
+ /**
+ * Instantiates a new Entry.
+ *
+ * @param key the key
+ */
public Entry(String key) {
super(key);
}
@@ -34,6 +39,7 @@ public class Entry extends EntryBase {
* Sets the initial value to set the {@link java.util.Properties property} to, if not already defined.
*
* @param defaultValue the default value
+ * @return the entry
*/
@SuppressWarnings("unused")
public Entry defaultValue(Object defaultValue) {
@@ -43,6 +49,8 @@ public class Entry extends EntryBase {
/**
* Sets the {@link Entry entry} up for deletion.
+ *
+ * @return the entry
*/
public Entry delete() {
setDelete(true);
@@ -53,6 +61,7 @@ public class Entry extends EntryBase {
* Creates a new {@link Entry entry}.
*
* @param modify the modification function
+ * @return the entry
*/
public Entry modify(BiFunction modify) {
setModify(modify);
@@ -64,6 +73,7 @@ public class Entry extends EntryBase {
*
* @param value the value to perform a modification with
* @param modify the modification function
+ * @return the entry
*/
public Entry modify(String value, BiFunction modify) {
setModifyValue(value);
@@ -75,6 +85,7 @@ public class Entry extends EntryBase {
* Sets the new {@link java.util.Properties property} value.
*
* @param s The new value
+ * @return the entry
*/
public Entry set(Object s) {
setNewValue(s);
diff --git a/src/main/java/rife/bld/extension/propertyfile/EntryBase.java b/src/main/java/rife/bld/extension/propertyfile/EntryBase.java
index ad2c5d9..89b1ea0 100644
--- a/src/main/java/rife/bld/extension/propertyfile/EntryBase.java
+++ b/src/main/java/rife/bld/extension/propertyfile/EntryBase.java
@@ -49,6 +49,8 @@ public class EntryBase {
/**
* Returns the calculation function.
+ *
+ * @return the calc function
*/
protected IntFunction getCalc() {
return calc;
@@ -56,6 +58,8 @@ public class EntryBase {
/**
* Returns the default value.
+ *
+ * @return the default value
*/
protected Object getDefaultValue() {
return defaultValue;
@@ -63,6 +67,8 @@ public class EntryBase {
/**
* Returns the key of the {@link java.util.Properties property}.
+ *
+ * @return the key
*/
protected String getKey() {
return key;
@@ -70,6 +76,8 @@ public class EntryBase {
/**
* Returns the modify function.
+ *
+ * @return the modify function
*/
protected BiFunction getModify() {
return modify;
@@ -77,6 +85,8 @@ public class EntryBase {
/**
* Returns the value to be used in the {@link #modify} function.
+ *
+ * @return the modify value
*/
protected String getModifyValue() {
return modifyValue;
@@ -84,6 +94,8 @@ public class EntryBase {
/**
* Returns the new value to set the {@link java.util.Properties property)} to.
+ *
+ * @return the new value
*/
public Object getNewValue() {
return newValue;
@@ -91,6 +103,8 @@ public class EntryBase {
/**
* Returns the pattern.
+ *
+ * @return the pattern
*/
protected String getPattern() {
return pattern;
@@ -98,6 +112,8 @@ public class EntryBase {
/**
* Returns the {@link EntryDate.Units unit}.
+ *
+ * @return the unit
*/
protected EntryDate.Units getUnit() {
return unit;
@@ -105,6 +121,8 @@ public class EntryBase {
/**
* Returns {@code true} if the {@link java.util.Properties property} is to be deleted.
+ *
+ * @return {@code true} or {@code false}
*/
protected boolean isDelete() {
return isDelete;
@@ -114,6 +132,7 @@ public class EntryBase {
* Sets the key of the {@link java.util.Properties property}.
*
* @param key the {@link java.util.Properties property} key
+ * @return this instance
*/
@SuppressWarnings("unused")
public EntryBase key(String key) {
@@ -123,6 +142,8 @@ public class EntryBase {
/**
* Sets the calculation function.
+ *
+ * @param calc the calc function
*/
protected void setCalc(IntFunction calc) {
this.calc = calc;
@@ -139,6 +160,8 @@ public class EntryBase {
/**
* Sets whether the {@link java.util.Properties property} should be deleted.
+ *
+ * @param delete {@code true} or {@code false}
*/
protected void setDelete(boolean delete) {
isDelete = delete;
@@ -155,6 +178,8 @@ public class EntryBase {
/**
* Sets the modify function.
+ *
+ * @param modify the modify function
*/
protected void setModify(BiFunction modify) {
this.modify = modify;
@@ -163,7 +188,8 @@ public class EntryBase {
/**
* Sets the modify function.
*
- * @param value the value to perform a modification with
+ * @param value the value to perform a modification with
+ * @param modify the modify function
*/
protected void setModify(String value, BiFunction modify) {
this.modifyValue = value;
diff --git a/src/main/java/rife/bld/extension/propertyfile/EntryDate.java b/src/main/java/rife/bld/extension/propertyfile/EntryDate.java
index 7a0beeb..d1d3dc4 100644
--- a/src/main/java/rife/bld/extension/propertyfile/EntryDate.java
+++ b/src/main/java/rife/bld/extension/propertyfile/EntryDate.java
@@ -41,6 +41,7 @@ public class EntryDate extends EntryBase {
* Creates a new {@link EntryDate entry}.
*
* @param calc the calculation function
+ * @return this instance
*/
public EntryDate calc(IntFunction calc) {
setCalc(calc);
@@ -49,6 +50,8 @@ public class EntryDate extends EntryBase {
/**
* Sets the {@link EntryDate entry} up for deletion.
+ *
+ * @return this instance
*/
public EntryDate delete() {
setDelete(true);
@@ -57,6 +60,8 @@ public class EntryDate extends EntryBase {
/**
* Sets the new {@link java.util.Properties property} value to now.
+ *
+ * @return this instance
*/
public EntryDate now() {
setNewValue("now");
@@ -68,6 +73,7 @@ public class EntryDate extends EntryBase {
* {@link java.time.format.DateTimeFormatter DateTimeFormatter} respectively.
*
* @param pattern the pattern
+ * @return this instance
*/
public EntryDate pattern(String pattern) {
setPattern(pattern);
@@ -78,6 +84,7 @@ public class EntryDate extends EntryBase {
* Sets the new {@link java.util.Properties property} value to an {@link Instant}
*
* @param instant the {@link Instant} to set the value to
+ * @return this instance
*/
public EntryDate set(Instant instant) {
setNewValue(instant);
@@ -88,6 +95,7 @@ public class EntryDate extends EntryBase {
* Sets the new {@link java.util.Properties property} value to a {@link LocalDate}
*
* @param date the {@link LocalDate} to set the value to
+ * @return this instance
*/
public EntryDate set(LocalDate date) {
setNewValue(date);
@@ -98,6 +106,7 @@ public class EntryDate extends EntryBase {
* Sets the new {@link java.util.Properties property} value to a {@link LocalDateTime}
*
* @param date the {@link LocalDateTime} to set the value to
+ * @return this instance
*/
public EntryDate set(LocalDateTime date) {
setNewValue(date);
@@ -108,6 +117,7 @@ public class EntryDate extends EntryBase {
* Sets the new {@link java.util.Properties property} value to a {@link ZonedDateTime}
*
* @param date the {@link ZonedDateTime} to set the value to
+ * @return this instance
*/
public EntryDate set(ZonedDateTime date) {
setNewValue(date);
@@ -118,6 +128,7 @@ public class EntryDate extends EntryBase {
* Sets the new {@link java.util.Properties property} value to a {@link LocalTime}
*
* @param time the {@link LocalTime} to set the value to
+ * @return this instance
*/
public EntryDate set(LocalTime time) {
setNewValue(time);
@@ -128,6 +139,7 @@ public class EntryDate extends EntryBase {
* Sets the new {@link java.util.Properties property} value to a {@link Calendar}
*
* @param cal the {@link Calendar} to set the value to
+ * @return this instance
*/
public EntryDate set(Calendar cal) {
setNewValue(cal);
@@ -138,6 +150,7 @@ public class EntryDate extends EntryBase {
* Sets the new {@link java.util.Properties property} value to a {@link Date}
*
* @param date the {@link Date} to set the value to
+ * @return this instance
*/
public EntryDate set(Date date) {
setNewValue(date);
@@ -148,6 +161,7 @@ public class EntryDate extends EntryBase {
* Sets the {@link Units unit} value to apply to calculations for {@link EntryDate}.
*
* @param unit the {@link Units unit}
+ * @return this instance
*/
public EntryDate unit(Units unit) {
setUnit(unit);
@@ -168,6 +182,33 @@ public class EntryDate extends EntryBase {
*
*/
public enum Units {
- SECOND, MINUTE, HOUR, DAY, WEEK, MONTH, YEAR
+ /**
+ * Second units.
+ */
+ SECOND,
+ /**
+ * Minute units.
+ */
+ MINUTE,
+ /**
+ * Hour units.
+ */
+ HOUR,
+ /**
+ * Day units.
+ */
+ DAY,
+ /**
+ * Week units.
+ */
+ WEEK,
+ /**
+ * Month units.
+ */
+ MONTH,
+ /**
+ * Year units.
+ */
+ YEAR
}
}
diff --git a/src/main/java/rife/bld/extension/propertyfile/EntryInt.java b/src/main/java/rife/bld/extension/propertyfile/EntryInt.java
index 88d7dfa..db0b81d 100644
--- a/src/main/java/rife/bld/extension/propertyfile/EntryInt.java
+++ b/src/main/java/rife/bld/extension/propertyfile/EntryInt.java
@@ -38,6 +38,7 @@ public class EntryInt extends EntryBase {
* Creates a new {@link EntryInt entry}.
*
* @param calc the calculation function.
+ * @return this instance
*/
public EntryInt calc(IntFunction calc) {
setCalc(calc);
@@ -48,6 +49,7 @@ public class EntryInt extends EntryBase {
* Sets the initial value to set the {@link java.util.Properties property} to, if not already defined.
*
* @param defaultValue the default value
+ * @return this instance
*/
@SuppressWarnings("unused")
public EntryInt defaultValue(Object defaultValue) {
@@ -57,6 +59,8 @@ public class EntryInt extends EntryBase {
/**
* Sets the {@link EntryInt entry} up for deletion.
+ *
+ * @return this instance
*/
public EntryInt delete() {
setDelete(true);
@@ -67,6 +71,7 @@ public class EntryInt extends EntryBase {
* Sets the new {@link java.util.Properties property} value to an integer.
*
* @param i The integer to set the value to
+ * @return this instance
*/
public EntryInt set(int i) {
setNewValue(i);
diff --git a/src/main/java/rife/bld/extension/propertyfile/PropertyFileOperation.java b/src/main/java/rife/bld/extension/propertyfile/PropertyFileOperation.java
index 725e22f..5f330a0 100644
--- a/src/main/java/rife/bld/extension/propertyfile/PropertyFileOperation.java
+++ b/src/main/java/rife/bld/extension/propertyfile/PropertyFileOperation.java
@@ -41,6 +41,7 @@ public class PropertyFileOperation extends AbstractOperation