Advertisement
Guest User

Untitled

a guest
Aug 19th, 2017
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.57 KB | None | 0 0
  1. /**
  2.  * Server commands, see CommandType for a list of types
  3.  * @author fragger
  4.  */
  5. public class Command<T> implements Serializable {
  6.  
  7.     private CommandType type;
  8.     private T[] data;
  9.  
  10.  
  11.     public Command(CommandType type, T[] data) {
  12.         this.type = type;
  13.         this.data = data;
  14.     }
  15.  
  16.     public Command(CommandType type) {
  17.         this.type = type;
  18.     }
  19.  
  20.     public void setData(T[] data) {
  21.         this.data = data;
  22.     }
  23.  
  24.     public T[] getData() {
  25.         return data;
  26.     }
  27.  
  28.     public CommandType getType() {
  29.         return type;
  30.     }
  31.  
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement