All Downloads are FREE. Search and download functionalities are using the official Maven repository.

brainslug.flow.execution.ExecutionProperties Maven / Gradle / Ivy

There is a newer version: 0.21
Show newest version
package brainslug.flow.execution;

import java.util.Collection;
import java.util.HashMap;
import java.util.Map;

public class ExecutionProperties {
  Map properties;

  public ExecutionProperties() {
    properties = new HashMap();
  }

  public ExecutionProperties put(Object key, Object value) {
    properties.put(key, value);
    return this;
  }

  public ExecutionProperties putAll(ExecutionProperties executionProperties) {
    this.properties.putAll(executionProperties.properties);
    return this;
  }

  public Object get(Object key) {
    return properties.get(key);
  }

  public Collection values() {
    return properties.values();
  }

  public static ExecutionProperties with(Object key, Object value) {
    return new ExecutionProperties().put(key, value);
  }
}