Skip to content

Commit 0b2d80c

Browse files
committed
hashDictionaryIndex implemented with update index functionality
1 parent 2674d48 commit 0b2d80c

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
package com.bhatmanr.invindex.comparisons.dictionaryimpl;
2+
3+
import java.util.HashMap;
4+
import java.util.Map;
5+
6+
public class HashDictionaryIndex implements DictionaryIndexObserver {
7+
8+
private static Map<String, String> hashTermIndex = new HashMap<String, String>();
9+
private Subject indexHandler;
10+
11+
public HashDictionaryIndex(Subject indxHndlr) {
12+
this.indexHandler = indxHndlr;
13+
indexHandler.RegisterObserverIndex(this);
14+
}
15+
16+
17+
public void UpdateIndex(String term, String docId) {
18+
hashTermIndex.put(term,docId);
19+
}
20+
21+
public void SearchIndex(String term) {
22+
23+
}
24+
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy