public void removeNotConnectedNetworkMasses() {
        for (int i = masses.size() - 1; i >= 0; i--) {
            Mass mass = masses.get(i);

            if (mass.getType() == NETWORK && getSprings(mass).isEmpty()) {
                masses.remove(i);
            }
        }
    }