uploadsort.java

来自「移动彩信管理平台」· Java 代码 · 共 119 行

JAVA
119
字号
package com.my7g.zj.mobile.mms.bean;

import java.io.File;

public class UploadSort implements Comparable {

	private int frameSize;
	
	private String fileName;
	
	private int seconds;
	
	private String layOut;
	
	private File file;
	
	public int compareTo(Object o) {
		// TODO Auto-generated method stub
		UploadSort upsort = (UploadSort) o;
		
		int flag = 0;
		
		if(frameSize > upsort.frameSize){
			flag = 1;
		}
		
		if(frameSize == upsort.frameSize){
			if(seconds<upsort.seconds){
				flag = -1;
			}
			if(seconds>upsort.seconds){
				flag = 1;
			}
			if(seconds==upsort.seconds){
				flag = 0;
			}
		}
		
		if(frameSize<upsort.frameSize){
			flag = -1;
		}
		return flag;
	}

	/**
	 * @return the frameSize
	 */
	public int getFrameSize() {
		return frameSize;
	}

	/**
	 * @param frameSize the frameSize to set
	 */
	public void setFrameSize(int frameSize) {
		this.frameSize = frameSize;
	}

	/**
	 * @return the fileName
	 */
	public String getFileName() {
		return fileName;
	}

	/**
	 * @param fileName the fileName to set
	 */
	public void setFileName(String fileName) {
		this.fileName = fileName;
	}

	/**
	 * @return the seconds
	 */
	public int getSeconds() {
		return seconds;
	}

	/**
	 * @param seconds the seconds to set
	 */
	public void setSeconds(int seconds) {
		this.seconds = seconds;
	}

	/**
	 * @return the layOut
	 */
	public String getLayOut() {
		return layOut;
	}

	/**
	 * @param layOut the layOut to set
	 */
	public void setLayOut(String layOut) {
		this.layOut = layOut;
	}

	/**
	 * @return the file
	 */
	public File getFile() {
		return file;
	}

	/**
	 * @param file the file to set
	 */
	public void setFile(File file) {
		this.file = file;
	}

	public String toString(){
		return "帧数:"+this.frameSize+"文件名:"+this.fileName+"秒数:"+this.seconds+"布局: "+this.layOut;
	}
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?