示例#1
0
 @Override
 public int hashCode() {
   int result = super.hashCode();
   result = 31 * result + (protocol != null ? protocol.hashCode() : 0);
   result = 31 * result + (int) tosOverwrite;
   result = 31 * result + (int) tosMask;
   result = 31 * result + srcAddress.hashCode();
   result = 31 * result + dstAddress.hashCode();
   result = 31 * result + (int) srcPort;
   result = 31 * result + (int) dstPort;
   result = 31 * result + (int) priority;
   return result;
 }
 public void testHashCode() throws Exception {
   byte data[] = {0, 10, 20, 40, 50};
   InetAddress addr1 = InetAddress.getByAddress(new byte[] {127, 0, 0, 1});
   InetAddress addr2 = InetAddress.getByAddress(new byte[] {127, 0, 0, 2});
   ChannelBinding cb = new ChannelBinding(addr1, addr2, data);
   assertEquals(addr1.hashCode(), cb.hashCode());
 }
 /** Eclipse generated hashCode and equals */
 @Override
 public int hashCode() {
   final int prime = 31;
   int result = 1;
   result = prime * result + ((address == null) ? 0 : address.hashCode());
   result = prime * result + port;
   return result;
 }
 @Override
 public int hashCode() {
   final int prime = 31;
   int result = 1;
   result = prime * result + ((directory == null) ? 0 : directory.hashCode());
   result = prime * result + ((diskStoreID == null) ? 0 : diskStoreID.hashCode());
   result = prime * result + ((host == null) ? 0 : host.hashCode());
   result = prime * result + (int) (revokedTime ^ (revokedTime >>> 32));
   return result;
 }
示例#5
0
 @Override
 public int hashCode() {
   final int prime = 31;
   int result = super.hashCode();
   result = prime * result + ((port == null) ? 0 : port.hashCode());
   result = prime * result + ((sIP == null) ? 0 : sIP.hashCode());
   result = prime * result + Arrays.hashCode(sMac);
   result = prime * result + Arrays.hashCode(tMac);
   result = prime * result + vlan;
   return result;
 }
示例#6
0
 @Override
 public int hashCode() {
   int prime = 31;
   int result = 1;
   result = prime * result + (id == null ? 0 : id.hashCode());
   result = prime * result + (identityAssocId == null ? 0 : identityAssocId.hashCode());
   result = prime * result + (ipAddress == null ? 0 : ipAddress.hashCode());
   result = prime * result + (preferredEndTime == null ? 0 : preferredEndTime.hashCode());
   result = prime * result + (startTime == null ? 0 : startTime.hashCode());
   result = prime * result + state;
   result = prime * result + (validEndTime == null ? 0 : validEndTime.hashCode());
   return result;
 }
 @Override
 public int hashCode() {
   int result = super.hashCode();
   result = 31 * result + srcIp.hashCode();
   return result;
 }
 /**
  * {@collect.stats} {@description.open} Returns a hashcode for this socket address.
  * {@description.close}
  *
  * @return a hash code value for this socket address.
  */
 public final int hashCode() {
   if (addr != null) return addr.hashCode() + port;
   if (hostname != null) return hostname.hashCode() + port;
   return port;
 }
示例#9
0
 @Override
 public int hashCode() {
   return addr.hashCode() ^ port ^ (int) time;
 }
 /**
  * Get the hash code for this instance. It will be equal to the hash code of the {@code
  * InetAddress} object herein.
  *
  * @return the hash code
  */
 public int hashCode() {
   return inetAddress.hashCode();
 }