Some naming changes in property manager

master
Ondřej Hruška 10 years ago
parent b4018ab487
commit 065392f934
  1. 8
      src/mightypork/utils/config/propmgr/Property.java
  2. 18
      src/mightypork/utils/config/propmgr/PropertyManager.java

@ -78,7 +78,7 @@ public abstract class Property<T> {
* *
* @return the value * @return the value
*/ */
public final T getValue() public T getValue()
{ {
return value; return value;
} }
@ -92,7 +92,7 @@ public abstract class Property<T> {
* @throws ClassCastException in case of incompatible type. * @throws ClassCastException in case of incompatible type.
*/ */
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
public final void setValue(Object value) public void setValue(Object value)
{ {
this.value = (T) value; this.value = (T) value;
} }
@ -103,7 +103,7 @@ public abstract class Property<T> {
* *
* @return the comment text (can be null if no comment is defined) * @return the comment text (can be null if no comment is defined)
*/ */
public final String getComment() public String getComment()
{ {
return comment; return comment;
} }
@ -114,7 +114,7 @@ public abstract class Property<T> {
* *
* @return property key * @return property key
*/ */
public final String getKey() public String getKey()
{ {
return key; return key;
} }

@ -193,9 +193,9 @@ public class PropertyManager {
* @param d default value * @param d default value
* @param comment the in-file comment * @param comment the in-file comment
*/ */
public void putBoolean(String k, boolean d, String comment) public void addBoolean(String k, boolean d, String comment)
{ {
putProperty(new BooleanProperty(k, d, comment)); addProperty(new BooleanProperty(k, d, comment));
} }
@ -206,9 +206,9 @@ public class PropertyManager {
* @param d default value * @param d default value
* @param comment the in-file comment * @param comment the in-file comment
*/ */
public void putDouble(String k, double d, String comment) public void addDouble(String k, double d, String comment)
{ {
putProperty(new DoubleProperty(k, d, comment)); addProperty(new DoubleProperty(k, d, comment));
} }
@ -219,9 +219,9 @@ public class PropertyManager {
* @param d default value * @param d default value
* @param comment the in-file comment * @param comment the in-file comment
*/ */
public void putInteger(String k, int d, String comment) public void addInteger(String k, int d, String comment)
{ {
putProperty(new IntegerProperty(k, d, comment)); addProperty(new IntegerProperty(k, d, comment));
} }
@ -232,9 +232,9 @@ public class PropertyManager {
* @param d default value * @param d default value
* @param comment the in-file comment * @param comment the in-file comment
*/ */
public void putString(String k, String d, String comment) public void addString(String k, String d, String comment)
{ {
putProperty(new StringProperty(k, d, comment)); addProperty(new StringProperty(k, d, comment));
} }
@ -243,7 +243,7 @@ public class PropertyManager {
* *
* @param prop property to add * @param prop property to add
*/ */
public <T> void putProperty(Property<T> prop) public <T> void addProperty(Property<T> prop)
{ {
entries.put(prop.getKey(), prop); entries.put(prop.getKey(), prop);
} }

Loading…
Cancel
Save