//package tests; public class Event { int id; int symbol; float price; int volume; int year; int month; int day; int hour; int minute; int second; int count; public Event(){id =0;} public Event(int a){id = a;} public Event(int symbol, float price, int volume, int nowYear, int nowMonth, int nowDay, int nowHour, int nowMinute, int nowSecond, int count){ this.symbol = symbol; this.price = price; this.volume = volume; this.year = nowYear; this.month = nowMonth; this.day = nowDay; this.hour = nowHour; this.minute = nowMinute; this.second = nowSecond; this.count = count; }; public Event(int symbol, float price){ this.symbol=symbol; this.price=price; } public String toString() { StringBuilder buffer = new StringBuilder(); buffer.append("stock("); buffer.append(this.symbol); buffer.append(","); buffer.append(this.price); buffer.append(","); buffer.append(this.volume); buffer.append(","); buffer.append("datime("); buffer.append(this.year); buffer.append(","); buffer.append(this.month); buffer.append(","); buffer.append(this.day); buffer.append(","); buffer.append(this.hour); buffer.append(","); buffer.append(this.minute); buffer.append(","); buffer.append(this.second); buffer.append(","); buffer.append(this.count); buffer.append("))"); return buffer.toString(); } public void setId(int _sim){id = _sim;} public void setSymbol(int symbol){this.symbol = symbol;} public void setPrice(float price){this.price = price;} public int getId(){return this.id;} public int getSymbol(){return this.symbol;} public float getPrice(){return this.price;} }