Advertisement
Guest User

Untitled

a guest
Nov 15th, 2013
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. package testapp;
  2.  
  3. import java.util.HashMap;
  4.  
  5. /**
  6. *
  7. * @Author Jake
  8. */
  9. public class HelpMessages {
  10.  
  11. private static HashMap<String, String[]> helpMap = new HashMap<String, String[]>();
  12.  
  13.  
  14. public static void addMessage(String base, String ... message) {
  15.  
  16. helpMap.put(base, message);
  17.  
  18.  
  19. }
  20.  
  21. public static String get(String base) {
  22.  
  23. if (helpMap.get(base) != null) {
  24.  
  25. String holder = "";
  26.  
  27. for (String s: helpMap.get(base)) {
  28.  
  29. holder += "\n" + s;
  30.  
  31. }
  32.  
  33. return holder;
  34.  
  35. }
  36.  
  37. return null;
  38. }
  39.  
  40. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement