...... how can i tag an array of string in java ?
i want to make an array of strings and tag them like :
m funny
s funny
t boring
k boring
then if the user can search for them by tagging
like
search : funny
::
m,s
...... how can i tag an array of string in java ?
i want to make an array of strings and tag them like :
m funny
s funny
t boring
k boring
then if the user can search for them by tagging
like
search : funny
::
m,s
The below code might help you:
Code:// key is string, value all the tags for the string HashMap<String, HashSet<String>> invertedTags = new HashMap<String, HashSet<String>>(); // tags of the word: "m" Set<String> tags = invertedTags.get("m");
Bookmarks