songstring.java
来自「mp3播放功能」· Java 代码 · 共 61 行
JAVA
61 行
package Function;
/**
* The class is designed to set and get the name and the
* path of a song for other classes and methods.
*
* @author DuXiaojing
*
*/
public class SongString {
private String name;
private String path;
/**
*
* @return Returns the name of a song
*/
public String getName() {
return name;
}
/**
* Set the name of a song
*
* @param name
*/
public void setName(String name) {
this.name = name;
}
/**
*
* @return Returns the path of a song
*/
public String getPath() {
return path;
}
/**
* Set the path of a song
*
* @param path
*/
public void setPath(String path) {
this.path = path;
}
public SongString(String name, String path) {
super();
this.name = name;
this.path = path;
}
/**
* @return Returns the name string
*/
public String toString(){
return getName();
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?