changeset 24:c3e40ba8250a

Restore SearchStat to retain backward compatibility with older Blitz's particularly for Dashboard.
author Dan Creswell <dan.creswell@gmail.com>
date Fri, 28 Aug 2009 21:01:53 +0100
parents 28c84687bdb8
children 506c6c316c8b
files src/org/dancres/blitz/stats/SearchStat.java
diffstat 1 files changed, 40 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/org/dancres/blitz/stats/SearchStat.java	Fri Aug 28 21:01:53 2009 +0100
@@ -0,0 +1,40 @@
+package org.dancres.blitz.stats;
+
+/**
+ */
+public class SearchStat implements Stat {
+    private long _id;
+    private String _type;
+    private String[] _titles;
+    private long[] _missed;
+    private long[] _deleted;
+
+    public SearchStat(long anId, String aType,
+                      String[] aTitles,
+                      long[] aMisses, long[] aDeld) {
+        _id = anId;
+        _type = aType;
+        _titles = aTitles;
+        _missed = aMisses;
+        _deleted = aDeld;
+    }
+    
+    public long getId() {
+        return _id;
+    }
+
+    public String toString() {
+        StringBuffer myBuffer = new StringBuffer("Search: " + _type);
+
+        for (int i = 0; i < _titles.length; i++) {
+            myBuffer.append(" ");
+            myBuffer.append(_titles[i]);
+            myBuffer.append(" miss: ");
+            myBuffer.append(_missed[i]);
+            myBuffer.append(" deld: ");
+            myBuffer.append(_deleted[i]);
+        }
+
+        return myBuffer.toString();
+    }
+}