-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathHashedInfo.java
More file actions
44 lines (38 loc) · 906 Bytes
/
HashedInfo.java
File metadata and controls
44 lines (38 loc) · 906 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
import java.util.HashMap;
/**
* Wrapper for HashMap<String,String> Object
*
* @author Chae Jubb
* @version 1.0
*
*/
public class HashedInfo {
private final HashMap<String, String> infoHash;
/**
* Constructor. Creates object identical to parameter and stores as instance
* variable of this object
*
* @param hash
* the HashMap<String,String> to be wrapped
*/
public HashedInfo(HashMap<String, String> hash) {
this.infoHash = new HashMap<String, String>();
this.infoHash.putAll(hash);
}
/**
* Accessor for HashMap Object
*
* @return HashMap Object wrapped by this class
*/
public HashMap<String, String> getHasher() {
return this.infoHash;
}
/**
* Accessor for String representation of HashMap
*
* @return String representation of HashMap Object wrapped by this class
*/
public String toString() {
return this.infoHash.toString();
}
}