public double getMass() {
        double returnedMass = 0;
        for (AstronomicalObject astronomicalObject : elements) {
            returnedMass += astronomicalObject.getMass();
        }
        return returnedMass;
    }