Advertisement
Guest User

Untitled

a guest
Dec 22nd, 2014
134
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.11 KB | None | 0 0
  1. 1) String action; //the name of the action itself
  2. 2) String categoryOfAction; //the category of the action
  3. 3) Integer personWhoPerformedAction; //the person that did the action
  4. 4) Long timeOfOccurrence; //the time the action was done
  5.  
  6. String[] actionOccurances = map1.get(action); //returns every occurrence of that action (possibly in an array), including who did that occurrence, time the occurrence occurred, and the category of that occurrence
  7.  
  8. Long latestOccurance = map2.get(action); //returns the latest occurrence of that action
  9.  
  10. String[] actionsPerformedByPerson = map3.get(personWhoPerformedAction); //returns every action that this person has done, including the category of that action, the time they performed that action, and the name of the action itself
  11.  
  12. DB thedb = DBMaker.newTempFileDB().make();
  13.  
  14. NavigableSet<Object> map1 = thedb.createTreeSet("actionOccurences").comparator(Fun.COMPARABLE_ARRAY_COMPARATOR).make();
  15.  
  16. HTreeMap<String, Long> map2 = thedb.getHashMap("lastOccurrence");
  17.  
  18. NavigableSet<Object> map3 = thedb.createTreeSet("actionsPerformedByPerson").comparator(Fun.COMPARABLE_ARRAY_COMPARATOR).make();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement