public void addMasses(Mass... masses) {
        if (masses == null) {
            throw new IllegalArgumentException("The argument may not be null.");
        }

        for (Mass mass : masses) {
            if (mass == null) {
                throw new IllegalArgumentException("The argument may not contain nulls.");
            }
        }

        this.masses.addAll(Arrays.asList(masses));
    }