Пример #1
0
 @Override
 public int hashCode() {
   final int prime = 31;
   int result = 1;
   result = prime * result + ((data == null) ? 0 : data.hashCode());
   result = prime * result + id;
   result = prime * result + ((sessionId == null) ? 0 : sessionId.hashCode());
   result = prime * result + ((type == null) ? 0 : type.hashCode());
   return result;
 }
Пример #2
0
 @Override
 public String toString() {
   return String.format(
       "%s (%d) [%s]",
       type != null ? type.toString() : "no type", id, data != null ? data.toString() : "");
 }