📄 album.java
字号:
/*******************************************************************************
* Copyright (c) 2007 Siemens AG
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Kai T鰀ter - initial API and implementation
*******************************************************************************/
package com.siemens.ct.mp3m.model.logical;
import java.util.ArrayList;
import java.util.List;
/**
* This class represents an Album
*/
public class Album {
List<Song> songs = new ArrayList<Song>();
Artist artist;
String name;
public Album(Artist artist, String name) {
this.artist = artist;
this.name = name;
}
public List<Song> getSongs() {
return songs;
}
/**
* Gets the name.
*
* @return Returns the name.
*/
public String getName() {
return name;
}
/**
* Sets the name.
*
* @param name
* The name to set.
*/
public void setName(String name) {
this.name = name;
}
/**
* Gets the artist.
*
* @return Returns the artist.
*/
public Artist getArtist() {
return artist;
}
/**
* Sets the artist.
*
* @param artist
* The artist to set.
*/
public void setArtist(Artist artist) {
this.artist = artist;
}
public void addSong(String name, String track, String duration, String file) {
Song song = new Song(this, name, file);
song.setTrack(track);
song.setDuration(duration);
songs.add(song);
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -