package edu.umass.cs.ciir.waltz.sys;

/**
 * @author jfoley
 */
public interface KeyMetadata<V, Subclass extends KeyMetadata<V, ?>> {
  int totalDocuments();

  void accumulate(Subclass m);

  void accumulate(int document, V item);

  Subclass zero();
}

@@ -133,104 +133,591 @@
 %7B%0A  
-int totalDocuments();%0A%0A  void accumulate(Subclass m);%0A%0A  void accumulate(int document, V item);%0A
+/**%0A   * Any type of metadata must at least know how many documents were seen.%0A   * @return the total number of documents.%0A   */%0A  int totalDocuments();%0A%0A  /**%0A   * Add in the information as represented by the other metadata object.%0A   * @param m another metadata object of the same class.%0A   */%0A  void accumulate(Subclass m);%0A%0A  /**%0A   * visit a document with a given value:%0A   * @param document the document id%0A   * @param item the value%0A   */%0A  void accumulate(int document, V item);%0A%0A  /**%0A   * @return an instance of this metadata which is semantically equivalent to zero.%0A   */
 %0A  S

document metadata class