Advertisement
Guest User

Untitled

a guest
Jul 29th, 2017
50
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. public static int processCommand(Vector<String> command){
  2.  
  3. if(command.get(0).equals("REGISTER") && command.size()==3){
  4. register.put(command.get(1), command.get(2));
  5. System.out.println("Registado!" + register.size());
  6. return 1;
  7. }
  8. else if(command.get(0).equals("LOOKUP") && command.size()==2){
  9. System.out.println(command.get(1));
  10. System.out.println(register.get(command.get(1)));
  11. return 2;
  12. }
  13. else return -1;
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement