public class WordCountAndSentences
extends java.lang.Object
implements java.lang.Comparable
Modifier and Type | Field and Description |
---|---|
int |
count
The word count.
|
java.util.Set<java.lang.Integer> |
sentences
Set of sentence numbers in which the word appears.
|
java.lang.Comparable |
word
The word.
|
Constructor and Description |
---|
WordCountAndSentences()
Create empty word count and sentences.
|
WordCountAndSentences(java.lang.Comparable word)
Create word count and sentences from word.
|
public java.lang.Comparable word
public int count
public java.util.Set<java.lang.Integer> sentences
public WordCountAndSentences()
public WordCountAndSentences(java.lang.Comparable word)
public int compareTo(java.lang.Object other)
compareTo
in interface java.lang.Comparable
other
- The count data objectpublic java.lang.String toString()
toString
in class java.lang.Object