Removed argument from safeDelete()
This commit is contained in:
parent
f2eeb1f1f9
commit
3db6ca026d
4 changed files with 37 additions and 39 deletions
|
@ -53,7 +53,7 @@ public class Entry extends EntryBase {
|
||||||
* @return the entry
|
* @return the entry
|
||||||
*/
|
*/
|
||||||
public Entry delete() {
|
public Entry delete() {
|
||||||
setDelete(true);
|
setDelete();
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -28,15 +28,15 @@ import java.util.function.IntFunction;
|
||||||
*/
|
*/
|
||||||
@SuppressWarnings("PMD.DataClass")
|
@SuppressWarnings("PMD.DataClass")
|
||||||
public class EntryBase {
|
public class EntryBase {
|
||||||
private IntFunction<Integer> calc;
|
private IntFunction<Integer> calc_;
|
||||||
private Object defaultValue;
|
private Object defaultValue_;
|
||||||
private boolean isDelete;
|
private boolean isDelete_;
|
||||||
private String key;
|
private String key_;
|
||||||
private BiFunction<String, String, String> modify;
|
private String modifyValue_ = "";
|
||||||
private String modifyValue = "";
|
private BiFunction<String, String, String> modify_;
|
||||||
private Object newValue;
|
private Object newValue_;
|
||||||
private String pattern = "";
|
private String pattern_ = "";
|
||||||
private EntryDate.Units unit = EntryDate.Units.DAY;
|
private EntryDate.Units unit_ = EntryDate.Units.DAY;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a new {@link EntryBase entry}.
|
* Creates a new {@link EntryBase entry}.
|
||||||
|
@ -44,7 +44,7 @@ public class EntryBase {
|
||||||
* @param key the required property key
|
* @param key the required property key
|
||||||
*/
|
*/
|
||||||
public EntryBase(String key) {
|
public EntryBase(String key) {
|
||||||
this.key = key;
|
key_ = key;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -53,7 +53,7 @@ public class EntryBase {
|
||||||
* @return the calc function
|
* @return the calc function
|
||||||
*/
|
*/
|
||||||
protected IntFunction<Integer> getCalc() {
|
protected IntFunction<Integer> getCalc() {
|
||||||
return calc;
|
return calc_;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -62,7 +62,7 @@ public class EntryBase {
|
||||||
* @return the default value
|
* @return the default value
|
||||||
*/
|
*/
|
||||||
protected Object getDefaultValue() {
|
protected Object getDefaultValue() {
|
||||||
return defaultValue;
|
return defaultValue_;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -71,7 +71,7 @@ public class EntryBase {
|
||||||
* @return the key
|
* @return the key
|
||||||
*/
|
*/
|
||||||
protected String getKey() {
|
protected String getKey() {
|
||||||
return key;
|
return key_;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -80,16 +80,16 @@ public class EntryBase {
|
||||||
* @return the modify function
|
* @return the modify function
|
||||||
*/
|
*/
|
||||||
protected BiFunction<String, String, String> getModify() {
|
protected BiFunction<String, String, String> getModify() {
|
||||||
return modify;
|
return modify_;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the value to be used in the {@link #modify} function.
|
* Returns the value to be used in the {@link #modify_} function.
|
||||||
*
|
*
|
||||||
* @return the modify value
|
* @return the modify value
|
||||||
*/
|
*/
|
||||||
protected String getModifyValue() {
|
protected String getModifyValue() {
|
||||||
return modifyValue;
|
return modifyValue_;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -98,7 +98,7 @@ public class EntryBase {
|
||||||
* @return the new value
|
* @return the new value
|
||||||
*/
|
*/
|
||||||
public Object getNewValue() {
|
public Object getNewValue() {
|
||||||
return newValue;
|
return newValue_;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -107,7 +107,7 @@ public class EntryBase {
|
||||||
* @return the pattern
|
* @return the pattern
|
||||||
*/
|
*/
|
||||||
protected String getPattern() {
|
protected String getPattern() {
|
||||||
return pattern;
|
return pattern_;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -116,7 +116,7 @@ public class EntryBase {
|
||||||
* @return the unit
|
* @return the unit
|
||||||
*/
|
*/
|
||||||
protected EntryDate.Units getUnit() {
|
protected EntryDate.Units getUnit() {
|
||||||
return unit;
|
return unit_;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -125,7 +125,7 @@ public class EntryBase {
|
||||||
* @return {@code true} or {@code false}
|
* @return {@code true} or {@code false}
|
||||||
*/
|
*/
|
||||||
protected boolean isDelete() {
|
protected boolean isDelete() {
|
||||||
return isDelete;
|
return isDelete_;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -136,7 +136,7 @@ public class EntryBase {
|
||||||
*/
|
*/
|
||||||
@SuppressWarnings("unused")
|
@SuppressWarnings("unused")
|
||||||
public EntryBase key(String key) {
|
public EntryBase key(String key) {
|
||||||
setKey(key);
|
key_ = key;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -146,7 +146,7 @@ public class EntryBase {
|
||||||
* @param calc the calc function
|
* @param calc the calc function
|
||||||
*/
|
*/
|
||||||
protected void setCalc(IntFunction<Integer> calc) {
|
protected void setCalc(IntFunction<Integer> calc) {
|
||||||
this.calc = calc;
|
calc_ = calc;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -155,16 +155,14 @@ public class EntryBase {
|
||||||
* @param defaultValue the default value
|
* @param defaultValue the default value
|
||||||
*/
|
*/
|
||||||
protected void setDefaultValue(Object defaultValue) {
|
protected void setDefaultValue(Object defaultValue) {
|
||||||
this.defaultValue = defaultValue;
|
defaultValue_ = defaultValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets whether the {@link java.util.Properties property} should be deleted.
|
* Sets the {@link java.util.Properties property} to be deleted.
|
||||||
*
|
|
||||||
* @param delete {@code true} or {@code false}
|
|
||||||
*/
|
*/
|
||||||
protected void setDelete(boolean delete) {
|
protected void setDelete() {
|
||||||
isDelete = delete;
|
isDelete_ = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -173,7 +171,7 @@ public class EntryBase {
|
||||||
* @param key the {@link java.util.Properties property} key
|
* @param key the {@link java.util.Properties property} key
|
||||||
*/
|
*/
|
||||||
protected void setKey(String key) {
|
protected void setKey(String key) {
|
||||||
this.key = key;
|
key_ = key;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -182,7 +180,7 @@ public class EntryBase {
|
||||||
* @param modify the modify function
|
* @param modify the modify function
|
||||||
*/
|
*/
|
||||||
protected void setModify(BiFunction<String, String, String> modify) {
|
protected void setModify(BiFunction<String, String, String> modify) {
|
||||||
this.modify = modify;
|
modify_ = modify;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -192,8 +190,8 @@ public class EntryBase {
|
||||||
* @param modify the modify function
|
* @param modify the modify function
|
||||||
*/
|
*/
|
||||||
protected void setModify(String value, BiFunction<String, String, String> modify) {
|
protected void setModify(String value, BiFunction<String, String, String> modify) {
|
||||||
this.modifyValue = value;
|
modifyValue_ = value;
|
||||||
this.modify = modify;
|
modify_ = modify;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -202,7 +200,7 @@ public class EntryBase {
|
||||||
* @param value the modify value.
|
* @param value the modify value.
|
||||||
*/
|
*/
|
||||||
protected void setModifyValue(String value) {
|
protected void setModifyValue(String value) {
|
||||||
this.modifyValue = value;
|
modifyValue_ = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -211,7 +209,7 @@ public class EntryBase {
|
||||||
* @param newValue the new value
|
* @param newValue the new value
|
||||||
*/
|
*/
|
||||||
public void setNewValue(Object newValue) {
|
public void setNewValue(Object newValue) {
|
||||||
this.newValue = newValue;
|
newValue_ = newValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -221,7 +219,7 @@ public class EntryBase {
|
||||||
* @param pattern the pattern
|
* @param pattern the pattern
|
||||||
*/
|
*/
|
||||||
protected void setPattern(String pattern) {
|
protected void setPattern(String pattern) {
|
||||||
this.pattern = pattern;
|
pattern_ = pattern;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -230,6 +228,6 @@ public class EntryBase {
|
||||||
* @param unit the {@link EntryDate.Units unit}
|
* @param unit the {@link EntryDate.Units unit}
|
||||||
*/
|
*/
|
||||||
protected void setUnit(EntryDate.Units unit) {
|
protected void setUnit(EntryDate.Units unit) {
|
||||||
this.unit = unit;
|
unit_ = unit;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -54,7 +54,7 @@ public class EntryDate extends EntryBase {
|
||||||
* @return this instance
|
* @return this instance
|
||||||
*/
|
*/
|
||||||
public EntryDate delete() {
|
public EntryDate delete() {
|
||||||
setDelete(true);
|
setDelete();
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -63,7 +63,7 @@ public class EntryInt extends EntryBase {
|
||||||
* @return this instance
|
* @return this instance
|
||||||
*/
|
*/
|
||||||
public EntryInt delete() {
|
public EntryInt delete() {
|
||||||
setDelete(true);
|
setDelete();
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue