## org.exist.util
Class Occurrences

    java.lang.Object
      org.exist.util.Occurrences

All Implemented Interfaces:
  java.lang.Comparable

public class Occurrences
extends java.lang.Object
implements java.lang.Comparable

Class to count element and word frequencies.

Constructor Summary
`Occurrences(java.lang.Comparable name)`

Method Summary
`void` `add(Occurrences other)`
`void` `addDocument(DocumentImpl doc)`
`void` `addOccurrences(int count)`
`int` `compareTo(java.lang.Object o)`
`int` `getDocuments()` Returns the number of documents from the set in which the term has been found.
`int` `getOccurrences()` Returns the overall frequency of this term in the document set.
`java.lang.Comparable` `getTerm()`

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### Occurrences

    public Occurrences(java.lang.Comparable name)

Method Detail

### getTerm

    public java.lang.Comparable getTerm()

### getOccurrences

    public int getOccurrences()

  Returns the overall frequency of this term in the document set.

### addOccurrences

    public void addOccurrences(int count)

### addDocument

    public void addDocument(DocumentImpl doc)

### add

    public void add(Occurrences other)

### getDocuments

    public int getDocuments()

  Returns the number of documents from the set in which the term has been found.

### compareTo

    public int compareTo(java.lang.Object o)

  Specified by:
    `compareTo` in interface `java.lang.Comparable`

Copyright (C) Wolfgang Meier. All rights reserved.