You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.
package domain ; // 定义在 domain 包下,表示该类是领域对象类,用于存储文件信息。
/**
* FileClass类, 表示文件信息。
* 该类用于存储文件的名称、路径和大小等基本信息,常用于文件管理或上传功能中。
*/
public class FileClass {
private String fileName ; // 文件名
private String filePath ; // 文件路径
private String fileSize ; // 文件大小
/**
* 获取文件名。
*
* @return 返回文件的名称
*/
public String getFileName ( ) {
return fileName ;
}
/**
* 设置文件名。
*
* @param fileName 文件名
*/
public void setFileName ( String fileName ) {
this . fileName = fileName ;
}
/**
* 获取文件路径。
*
* @return 返回文件的路径
*/
public String getFilePath ( ) {
return filePath ;
}
/**
* 设置文件路径。
*
* @param filePath 文件路径
*/
public void setFilePath ( String filePath ) {
this . filePath = filePath ;
}
/**
* 获取文件大小。
*
* @return 返回文件的大小
*/
public String getFileSize ( ) {
return fileSize ;
}
/**
* 设置文件大小。
*
* @param fileSize 文件大小
*/
public void setFileSize ( String fileSize ) {
this . fileSize = fileSize ;
}
/**
* 重写 toString 方法,返回文件名、路径和大小的字符串表示。
*
* @return 返回包含文件名、文件路径和文件大小信息的字符串
*/
@Override
public String toString ( ) {
return "FileClass{" +
"fileName='" + fileName + '\'' +
", filePath='" + filePath + '\'' +
", fileSize='" + fileSize + '\'' +
'}' ;
}
}