diff --git a/src/main/java/de/dhbwstuttgart/typeinference/unify/ConstraintSetRepository.java b/src/main/java/de/dhbwstuttgart/typeinference/unify/ConstraintSetRepository.java new file mode 100644 index 0000000..fb7b8e5 --- /dev/null +++ b/src/main/java/de/dhbwstuttgart/typeinference/unify/ConstraintSetRepository.java @@ -0,0 +1,21 @@ +package de.dhbwstuttgart.typeinference.unify; + +import de.dhbwstuttgart.typeinference.unify.model.UnifyPair; + +import java.util.HashSet; +import java.util.Set; + +public class ConstraintSetRepository { + private Set sets = new HashSet<>(); + + public boolean containsSet(Set> set){ + Integer hash = Integer.valueOf(set.hashCode()); + + if(sets.contains(hash)){ + return true; + }else{ + sets.add(hash); + return false; + } + } +}