Skip to content

Commit

Permalink
-fix javadoc
Browse files Browse the repository at this point in the history
  • Loading branch information
FelixSFD committed Aug 16, 2020
1 parent fb072fb commit 446f433
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ public String getPath() {

/**
* Writes the properties to the file
* @throws IOException if the file can't be saved
*/
@Override
public void save() throws IOException {
Expand All @@ -126,6 +127,7 @@ public void save() throws IOException {
* Writes the properties to a different file
*
* @param filePath Path of the file to write
* @throws IOException if the file can't be saved
*/
@Override
public void save(@NotNull String filePath) throws IOException {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@ public String getFilePath() {

/**
* Writes the properties to the file
* @throws IOException if the file can't be saved
*/
@Override
public void save() throws IOException {
Expand All @@ -177,6 +178,7 @@ public void save() throws IOException {
* Writes the properties to a different file
*
* @param filePath Path of the file to write
* @throws IOException if the file can't be saved
*/
@Override
public void save(@NotNull String filePath) throws IOException {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ public interface EnhancedWriteableProperties extends EnhancedProperties {
* Sets a given property
* @param key Name of the property
* @param value new Value
* @throws EPSetPropertyException if the property could not be set
*/
void setString(@NotNull String key, @Nullable String value) throws EPSetPropertyException;

Expand All @@ -53,6 +54,7 @@ public interface EnhancedWriteableProperties extends EnhancedProperties {
* Since the properties are always stored as strings, {@link String#valueOf(int)} )} will be used.
* @param key Name of the property
* @param value new Value
* @throws EPSetPropertyException if the property could not be set
*/
void setShort(@NotNull String key, short value) throws EPSetPropertyException;

Expand All @@ -62,6 +64,7 @@ public interface EnhancedWriteableProperties extends EnhancedProperties {
* Since the properties are always stored as strings, {@link String#valueOf(int)} will be used.
* @param key Name of the property
* @param value new Value
* @throws EPSetPropertyException if the property could not be set
*/
void setInt(@NotNull String key, int value) throws EPSetPropertyException;

Expand All @@ -71,6 +74,7 @@ public interface EnhancedWriteableProperties extends EnhancedProperties {
* Since the properties are always stored as strings, {@link String#valueOf(long)} will be used.
* @param key Name of the property
* @param value new Value
* @throws EPSetPropertyException if the property could not be set
*/
void setLong(@NotNull String key, long value) throws EPSetPropertyException;

Expand All @@ -80,6 +84,7 @@ public interface EnhancedWriteableProperties extends EnhancedProperties {
* Since the properties are always stored as strings, {@link String#valueOf(float)} will be used.
* @param key Name of the property
* @param value new Value
* @throws EPSetPropertyException if the property could not be set
*/
void setFloat(@NotNull String key, float value) throws EPSetPropertyException;

Expand All @@ -89,6 +94,7 @@ public interface EnhancedWriteableProperties extends EnhancedProperties {
* Since the properties are always stored as strings, {@link String#valueOf(double)} will be used.
* @param key Name of the property
* @param value new Value
* @throws EPSetPropertyException if the property could not be set
*/
void setDouble(@NotNull String key, double value) throws EPSetPropertyException;

Expand All @@ -98,17 +104,20 @@ public interface EnhancedWriteableProperties extends EnhancedProperties {
* Since the properties are always stored as strings, {@link String#valueOf(boolean)} will be used.
* @param key Name of the property
* @param value new Value
* @throws EPSetPropertyException if the property could not be set
*/
void setBoolean(@NotNull String key, boolean value) throws EPSetPropertyException;

/**
* Writes the properties to the file
* @throws IOException if the file could not be saved
*/
void save() throws IOException;

/**
* Writes the properties to a different file
* @param filePath Path of the file to write
* @throws IOException if the file could not be saved
*/
void save(@NotNull String filePath) throws IOException;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ public abstract class EnhancedWriteablePropertiesImpl extends EnhancedProperties
* Sets a given property
* @param key Name of the property
* @param value new Value
* @throws EPSetPropertyException if the property could not be set
* @throws EPTypeNotSupportedException if the type of the value is not supported
*/
protected void setValue(@NotNull String key, @Nullable Object value) throws EPTypeNotSupportedException, EPSetPropertyException {
Object originalValue = getValue(key, value != null ? value.getClass() : String.class);
Expand Down Expand Up @@ -127,6 +129,7 @@ private String getGetterName(@NotNull Class<?> type) {
*
* @param key Name of the property
* @param value new Value
* @throws EPSetPropertyException if the property could not be set
*/
@Override
public final void setShort(@NotNull String key, short value) throws EPSetPropertyException {
Expand All @@ -141,6 +144,7 @@ public final void setShort(@NotNull String key, short value) throws EPSetPropert
*
* @param key Name of the property
* @param value new Value
* @throws EPSetPropertyException if the property could not be set
*/
@Override
public final void setInt(@NotNull String key, int value) throws EPSetPropertyException {
Expand All @@ -155,6 +159,7 @@ public final void setInt(@NotNull String key, int value) throws EPSetPropertyExc
*
* @param key Name of the property
* @param value new Value
* @throws EPSetPropertyException if the property could not be set
*/
@Override
public final void setLong(@NotNull String key, long value) throws EPSetPropertyException {
Expand All @@ -169,6 +174,7 @@ public final void setLong(@NotNull String key, long value) throws EPSetPropertyE
*
* @param key Name of the property
* @param value new Value
* @throws EPSetPropertyException if the property could not be set
*/
@Override
public final void setFloat(@NotNull String key, float value) throws EPSetPropertyException {
Expand All @@ -183,6 +189,7 @@ public final void setFloat(@NotNull String key, float value) throws EPSetPropert
*
* @param key Name of the property
* @param value new Value
* @throws EPSetPropertyException if the property could not be set
*/
@Override
public final void setDouble(@NotNull String key, double value) throws EPSetPropertyException {
Expand All @@ -197,6 +204,7 @@ public final void setDouble(@NotNull String key, double value) throws EPSetPrope
*
* @param key Name of the property
* @param value new Value
* @throws EPSetPropertyException if the property could not be set
*/
@Override
public final void setBoolean(@NotNull String key, boolean value) throws EPSetPropertyException {
Expand Down Expand Up @@ -231,6 +239,10 @@ protected final void propertyChanged(String key, Object originalValue, Object ne
}


/**
* @return All listeners for changed properties
* @see ChangedPropertyListener
*/
@Override
public @NotNull Set<ChangedPropertyListener> getChangedPropertyListeners() {
if (changedPropertyListeners == null) {
Expand All @@ -241,6 +253,11 @@ protected final void propertyChanged(String key, Object originalValue, Object ne
}


/**
* Adds a new {@link ChangedPropertyListener}
* @param changedPropertyListener new listener
* @see #getChangedPropertyListeners()
*/
@Override
public void addChangedPropertyListener(@NotNull ChangedPropertyListener changedPropertyListener) {
getChangedPropertyListeners().add(changedPropertyListener);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ public class EPStringUtils {
* <br>
* Example:<br>
* <code>
* "hello" -> "Hello"
* "hello" becomes "Hello"
*
* "testString" -> "TestString"
* "testString" becomes "TestString"
* </code>
* @param input Input string
* @return String with first letter as uppercase
Expand Down

0 comments on commit 446f433

Please sign in to comment.