class TypeHierarchy {

    protected void addSupertype(String type, String supertype) {
        if (!supertypesByType.containsKey(type)) {
            supertypesByType.put(type, new HashSet<>());
        }
        if (!type.equals(supertype)) {
            supertypesByType.get(type).add(supertype);
        }
    }

    protected  TypeHierarchy();

}