Пример #1
0
        /** Creates a new Score with the given setup and data.
         *
         * @param setup  the ScoreSetup for this score.
         * @param data  the ScoreData for this score.  It is an error if
         *        this already belongs to a Score object.
         * @throws HeirarchyException if the data argument has already
         *      been added to a Score
         */
        public Score(ScoreSetup setup, ScoreData data)
        {
            if (data.getParentScore() != null)
            throw new HeirarchyException
              ("Cannot add ScoreData to Score because it already belongs to a Score object.");

              _setup = setup;
              _data = data;
              _data.setParentScore(this);
        }
Пример #2
0
        /** Creates a new Score with the given setup and data.
         *
         * @param setup  the ScoreSetup for this score.
         * @param data  the ScoreData for this score.  It is an error if
         *        this already belongs to a Score object.
         * @throws HeirarchyException if the data argument has already
         *      been added to a Score
         */
        public Score(ScoreSetup setup, ScoreData data)
        {
            if (data.getParentScore() != null)
            {
                throw new HeirarchyException
                          ("Cannot add ScoreData to Score because it already belongs to a Score object.");
            }

            _setup = setup;
            _data  = data;
            _data.setParentScore(this);
        }