public class Word
extends Object
implements Serializable
Modifier and Type | Field and Description |
---|---|
private List<Integer> |
postings
List for URLIDs associated with this Word.
|
static long |
serialVersionUID |
private String |
word
Fields for the String representation of this Word.
|
Constructor and Description |
---|
Word(String word,
int urlID)
Construct a word object.
|
Modifier and Type | Method and Description |
---|---|
void |
addURLID(int urlID)
Add urlID to this List.
|
boolean |
equals(Object obj)
Compare two Word objects by checking their string representations.
|
List<Integer> |
getList()
Get the ArrayList of associated urls
|
String |
getWord()
Get the String representation for this Word object
|
public static final long serialVersionUID
private String word
private List<Integer> postings
public Word(String word, int urlID)
word
- String representation of wordurlID
- urlID where the word was first seen.public void addURLID(int urlID)
urlID
- URLID of url the word appearspublic String getWord()
public List<Integer> getList()
public boolean equals(Object obj)
equals
in class Object
obj
- Word object to be compared