コード例 #1
0
ファイル: Nodes.java プロジェクト: kmetop/demsy
 @Override
 public int hashCode() {
   if (id == null) {
     return super.hashCode();
   }
   return 37 * 17 + id.hashCode();
 }
コード例 #2
0
ファイル: InstanceImpl.java プロジェクト: gearg100/quickml
 public int hashCode() {
   int result;
   long temp;
   result = attributes.hashCode();
   result = 31 * result + label.hashCode();
   temp = Double.doubleToLongBits(weight);
   result = 31 * result + (int) (temp ^ (temp >>> 32));
   return result;
 }
コード例 #3
0
 @Override
 public int hashCode() {
   int hash = 17;
   if (raw != null) {
     hash = 31 * hash + raw.hashCode();
   }
   if (serialized != null) {
     hash = 31 * hash + Arrays.hashCode(serialized);
   }
   return hash;
 }
コード例 #4
0
 /**
  * Returns the hashCode. If the {@link #getId() id} is not {@code null}, its hashcode is returned
  * immediately. If it is {@code null}, an attributes-based hashCode will be calculated and
  * returned.
  *
  * <p>Do your best to ensure {@code SimpleSession} instances receive an ID very early in their
  * lifecycle to avoid the more expensive attributes-based calculation.
  *
  * @return this object's hashCode
  * @since 1.0
  */
 @Override
 public int hashCode() {
   Serializable id = getId();
   if (id != null) {
     return id.hashCode();
   }
   int hashCode = getStartTimestamp() != null ? getStartTimestamp().hashCode() : 0;
   hashCode = 31 * hashCode + (getStopTimestamp() != null ? getStopTimestamp().hashCode() : 0);
   hashCode = 31 * hashCode + (getLastAccessTime() != null ? getLastAccessTime().hashCode() : 0);
   hashCode = 31 * hashCode + Long.valueOf(Math.max(getTimeout(), 0)).hashCode();
   hashCode = 31 * hashCode + Boolean.valueOf(isExpired()).hashCode();
   hashCode = 31 * hashCode + (getHost() != null ? getHost().hashCode() : 0);
   hashCode = 31 * hashCode + (getAttributes() != null ? getAttributes().hashCode() : 0);
   return hashCode;
 }
コード例 #5
0
 @Override
 public int hashCode() {
   return value.hashCode();
 }
コード例 #6
0
 public CacheRegionKey(String cacheRegion, Serializable cacheKey) {
   this.cacheRegion = cacheRegion;
   this.cacheKey = cacheKey;
   this.hashCode = cacheRegion.hashCode() + cacheKey.hashCode();
 }
コード例 #7
0
 @Override
 public int hashCode() {
   return value != null ? value.hashCode() : 0;
 }