public boolean isTransitiva() throws NaoEhRelacao {
        HashMap<Integer, HashMap<Integer, Elemento>> map = getMap();
        Conjunto c = new Conjunto();

        for (Map.Entry<Integer, HashMap<Integer, Elemento>> entry : map.entrySet()) {
            Integer i = entry.getKey();
            HashMap<Integer, Elemento> hashMap = entry.getValue();

            for (Map.Entry<Integer, Elemento> entry1 : hashMap.entrySet()) {
                Integer j = entry1.getKey();
                Elemento elemento = entry1.getValue();

                for (Map.Entry<Integer, HashMap<Integer, Elemento>> entryK : map.entrySet()) {
                    Integer k = entryK.getKey();
                    HashMap<Integer, Elemento> hashMapK = entryK.getValue();

                    if(map.get(i).get(j) != null && map.get(j) != null && map.get(j).get(k) != null && map.get(i).get(k) == null){
                        return false;
                    }
                }
            }
        }

        return true;
    }