01: /*
02: * This file is not part of the ItsNat framework.
03: *
04: * Original source code use and closed source derivatives are authorized
05: * to third parties with no restriction or fee.
06: * The original source code is owned by the author.
07: *
08: * This program is distributed AS IS in the hope that it will be useful,
09: * but WITHOUT ANY WARRANTY; without even the implied warranty of
10: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
11: *
12: * Author: Jose Maria Arranz Santamaria
13: * (C) Innowhere Software Services S.L., Spanish company, year 2007
14: */
15:
16: package org.itsnat.feashow.features.components.xmlcomp;
17:
18: import java.util.ArrayList;
19: import java.util.List;
20:
21: public class CompactDisc {
22: protected String title;
23: protected String artist;
24: protected List songs = new ArrayList();
25:
26: public CompactDisc(String title, String artist) {
27: this .title = title;
28: this .artist = artist;
29: }
30:
31: public String getTitle() {
32: return title;
33: }
34:
35: public void setTitle(String title) {
36: this .title = title;
37: }
38:
39: public String getArtist() {
40: return artist;
41: }
42:
43: public void setArtist(String artist) {
44: this .artist = artist;
45: }
46:
47: public int getSongCount() {
48: return songs.size();
49: }
50:
51: public Song getSong(int index) {
52: return (Song) songs.get(index);
53: }
54:
55: public void insertSong(int index, Song song) {
56: songs.add(index, song);
57: }
58:
59: public void addSong(Song song) {
60: songs.add(song);
61: }
62:
63: public void removeSong(int index) {
64: songs.remove(index);
65: }
66:
67: public List getSongList() {
68: return songs;
69: }
70:
71: }
|