Skip to content

Commit

Permalink
Adding documentation for async-log
Browse files Browse the repository at this point in the history
Autocommit Wed Jan 14 15:01:05 EST 2015
  • Loading branch information
mxro committed Jan 14, 2015
1 parent 5a7eba0 commit 5a9560d
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/main/java/de/mxro/async/properties/PropertiesCommon.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import de.mxro.async.properties.internal.CompositeFactory;
import de.mxro.async.properties.internal.DefaultFactory;
import de.mxro.async.properties.internal.UnsafePropertyNode;
import de.mxro.async.properties.internal.operations.ClearOperation;
import de.mxro.async.properties.internal.operations.SetValueOperation;

public class PropertiesCommon {
Expand Down Expand Up @@ -41,7 +42,7 @@ public static PropertyOperation set(final String id, final Object value) {
* @return
*/
public static PropertyOperation clear(final String id) {

return new ClearOperation().setId(id);
}

public static PropertyFactory defaultFactory() {
Expand Down
8 changes: 8 additions & 0 deletions src/main/java/de/mxro/async/properties/PropertyData.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,14 @@ public interface PropertyData {
*/
public <T> T get(String id, Class<T> type);

/**
* <p>
* Removes the property with the specified id.
*
* @param id
*/
public void remove(String id);

/**
* <p>
* Retrieves the property at the specified id.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
package de.mxro.async.properties.internal.operations;

public class ClearOperation {
import de.mxro.async.properties.PropertyData;
import de.mxro.async.properties.operations.PropertyOperationWithId;

public class ClearOperation extends PropertyOperationWithId {

@Override
public void perform(final PropertyData data) {
data.remove(id);
}

}

0 comments on commit 5a9560d

Please sign in to comment.