static String getConnectionsToPriorMasses(Mass currentMass, NetworkGraph graph) {
        String output = "";

        for (int i = 0; i < currentMass.getIndex(graph); i++) {
            Mass candidate = graph.getMasses().get(i);

            for (Spring spring : graph.getSprings(candidate)) {
                if (spring.isConnected(currentMass)) {
                    output += SEPARATOR + i;
                }
            }
        }

        return output;
    }