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

com.dooapp.gaedo.prevalence.space.basic.SimpleStorageSpace Maven / Gradle / Ivy

Go to download

A gaedo-inspired prevalence layer and the associated service, for making the most gaedo-efficient use of that layer

There is a newer version: 1.0.16
Show newest version
package com.dooapp.gaedo.prevalence.space.basic;

import java.io.Serializable;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;

import com.dooapp.gaedo.prevalence.space.StorageSpace;

public class SimpleStorageSpace implements StorageSpace{
	/**
	 * Effective storage map
	 */
	private Map storageMap;
	
	public SimpleStorageSpace() {
		this(new HashMap());
	}

	public SimpleStorageSpace(Map storageMap) {
		this.storageMap = storageMap;
	}

	@Override
	public boolean contains(Key key) {
		return storageMap.containsKey(key);
	}

	@Override
	public Object get(Key key) {
		return storageMap.get(key);
	}

	@Override
	public Object put(Key key, Object obj) {
		return storageMap.put(key, obj);
	}

	@Override
	public Object remove(Key key) {
		return storageMap.remove(key);
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy