private CircularQueue> bufferLogs = new CircularQueue >();
public void Write(Log log){
List logs = new ArrayList();
logs.add(log);
bufferLogs.ForceEnqueue(logs);
if(BaseAdapter!=null && bufferLogs.getCount()>=Size)
{
for(int i=bufferLogs.getCount();i>=0;i--)
{
logs.addAll(bufferLogs.Dequeue());
}
BaseAdapter.Write(logs);
}
}
--------------------------------------
public void Write(Log log){
bufferLogs.ForceEnqueue(logs);//此处有错 类型错误 而且logs在里面定义
if(BaseAdapter!=null && bufferLogs.getCount()>=Size)
{
List<Log> logs = new ArrayList<Log>();
for(int i=bufferLogs.getCount();i>=0;i--)
{
logs.addAll(bufferLogs.Dequeue());
}
BaseAdapter.Write(logs);
}
}
我写的第一种,老师说不行 要第二种 给了那样的代码 错误那里让我自己想办法改 我实在想不出啊 来个大神。