示例#1
0
 /**
  * Returns a hash code for this state object.
  *
  * @return a hash code value for this object.
  */
 @Override
 public int hashCode() {
   int result = 17;
   if (id != null) result = 37 * result + id.hashCode();
   result = 37 * result + init.hashCode();
   return result;
 }
示例#2
0
 /**
  * Compares this state object to the specified object.
  *
  * @param o the object to compare this state with.
  * @return <code>true</code> if the specified object is equal to this state, <code>false</code>
  *     otherwise.
  */
 @Override
 public boolean equals(Object o) {
   if (this == o) return true;
   if (o == null || getClass() != o.getClass()) return false;
   SVariableDeclarator state = (SVariableDeclarator) o;
   if (id == null ? state.id != null : !id.equals(state.id)) return false;
   if (!init.equals(state.init)) return false;
   return true;
 }