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

it.amattioli.common.properties.PropertyDependencies Maven / Gradle / Ivy

The newest version!
package it.amattioli.common.properties;

import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;

public class PropertyDependencies {
	
	private Map> dependencies = new HashMap>();
	
	public Set getDependencies(String propertyName) {
		Set result = dependencies.get(propertyName);
		if (result == null) {
			result = Collections.emptySet();
		}
		return result;
	}
	
	public void addDependency(String from, String to) {
		Set dep = dependencies.get(from);
		if (dep == null) {
			dep = new HashSet();
			dependencies.put(from, dep);
		}
		dep.add(to);
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy