Commit f87e9006 authored by yanzg's avatar yanzg

默认日期格式的支持

parent 3d08ffaa
package com.yanzuoguang.util.vo;
/**
* mq初始化对象,用于判断是否继续执行
*
* @param <T>
* @author 颜佐光
*/
public class MqInit<T> {
/**
* 当前系统时间搓,相当于版本号
*/
private long now = System.currentTimeMillis();
/**
* 数据
*/
private T data;
/**
* 当前数据
*
* @return
*/
public T getData() {
return data;
}
/**
* 设置数据
*
* @param data
*/
public void setData(T data) {
this.data = data;
}
/**
* 判断是否能够执行
*
* @param that
* @return
*/
public boolean next(MqInit<T> that) {
if (that.now < this.now) {
return false;
}
this.now = that.now;
this.data = that.data;
return true;
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment