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

com.reprezen.kaizen.oasparser.val.VisitedObjectRegistry Maven / Gradle / Ivy

package com.reprezen.kaizen.oasparser.val;

import java.util.IdentityHashMap;
import java.util.Map;

public class VisitedObjectRegistry {

	private Map visitedObjects = new IdentityHashMap<>();

	public boolean visitIfUnvisited(Object o) {
		if (visitedObjects.containsKey(o)) {
			return false;
		} else {
			visitedObjects.put(o, o);
			return true;
		}
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy