java.nio.ByteBuffer.hashCode()方法的使用及代码示例

x33g5p2x  于2022-01-16 转载在 其他  
字(6.0k)|赞(0)|评价(0)|浏览(153)

本文整理了Java中java.nio.ByteBuffer.hashCode()方法的一些代码示例,展示了ByteBuffer.hashCode()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ByteBuffer.hashCode()方法的具体详情如下:
包路径:java.nio.ByteBuffer
类名称:ByteBuffer
方法名:hashCode

ByteBuffer.hashCode介绍

[英]Calculates this buffer's hash code from the remaining chars. The position, limit, capacity and mark don't affect the hash code.
[中]根据剩余的字符计算此缓冲区的哈希代码。位置、限制、容量和标记不影响哈希代码。

代码示例

代码示例来源:origin: spring-projects/spring-framework

@Override
public int hashCode() {
  return this.byteBuffer.hashCode();
}

代码示例来源:origin: apache/kafka

@Override
  public int hashCode() {
    return buffer != null ? buffer.hashCode() : 0;
  }
}

代码示例来源:origin: apache/kafka

@Override
public int hashCode() {
  return buffer.hashCode();
}

代码示例来源:origin: apache/kafka

@Override
public int hashCode() {
  return buffer != null ? buffer.hashCode() : 0;
}

代码示例来源:origin: apache/kafka

public int hashCode() {
  return buffer.hashCode();
}

代码示例来源:origin: apache/incubator-druid

@Override
public int hashCode()
{
 int result = storageBuffer != null ? storageBuffer.hashCode() : 0;
 result = 31 * result + initPosition;
 return result;
}

代码示例来源:origin: apache/incubator-druid

@Override
 public int hashCode()
 {
  return data.hashCode();
 }
}

代码示例来源:origin: apache/kafka

@Override
public int hashCode() {
  int result = sizeInBytes;
  result = 31 * result + (int) attributes;
  result = 31 * result + (int) (offset ^ (offset >>> 32));
  result = 31 * result + (int) (timestamp ^ (timestamp >>> 32));
  result = 31 * result + sequence;
  result = 31 * result + (key != null ? key.hashCode() : 0);
  result = 31 * result + (value != null ? value.hashCode() : 0);
  result = 31 * result + Arrays.hashCode(headers);
  return result;
}

代码示例来源:origin: apache/kafka

@Override
public int hashCode() {
  int result = key != null ? key.hashCode() : 0;
  result = 31 * result + (value != null ? value.hashCode() : 0);
  result = 31 * result + (int) (timestamp ^ (timestamp >>> 32));
  result = 31 * result + Arrays.hashCode(headers);
  return result;
}

代码示例来源:origin: org.springframework/spring-core

@Override
public int hashCode() {
  return this.byteBuffer.hashCode();
}

代码示例来源:origin: TooTallNate/Java-WebSocket

@Override
  public int hashCode() {
    int result = ( fin ? 1 : 0 );
    result = 31 * result + optcode.hashCode();
    result = 31 * result + ( unmaskedpayload != null ? unmaskedpayload.hashCode() : 0 );
    result = 31 * result + ( transferemasked ? 1 : 0 );
    result = 31 * result + ( rsv1 ? 1 : 0 );
    result = 31 * result + ( rsv2 ? 1 : 0 );
    result = 31 * result + ( rsv3 ? 1 : 0 );
    return result;
  }
}

代码示例来源:origin: apache/storm

@Override
public int hashCode() {
 int hashCode = 1;
 hashCode = hashCode * 8191 + ((is_set_name()) ? 131071 : 524287);
 if (is_set_name())
  hashCode = hashCode * 8191 + name.hashCode();
 hashCode = hashCode * 8191 + ((is_set_bits()) ? 131071 : 524287);
 if (is_set_bits())
  hashCode = hashCode * 8191 + bits.hashCode();
 return hashCode;
}

代码示例来源:origin: apache/storm

@Override
public int hashCode() {
 int hashCode = 1;
 hashCode = hashCode * 8191 + ((is_set_id()) ? 131071 : 524287);
 if (is_set_id())
  hashCode = hashCode * 8191 + id.hashCode();
 hashCode = hashCode * 8191 + ((is_set_details()) ? 131071 : 524287);
 if (is_set_details())
  hashCode = hashCode * 8191 + details.hashCode();
 return hashCode;
}

代码示例来源:origin: aws/aws-sdk-java

@Override
public int hashCode() {
  final int prime = 31;
  int hashCode = 1;
  hashCode = prime * hashCode + ((getLoaContent() == null) ? 0 : getLoaContent().hashCode());
  hashCode = prime * hashCode + ((getLoaContentType() == null) ? 0 : getLoaContentType().hashCode());
  return hashCode;
}

代码示例来源:origin: apache/storm

@Override
public int hashCode() {
 int hashCode = 1;
 hashCode = hashCode * 8191 + ((is_set_key()) ? 131071 : 524287);
 if (is_set_key())
  hashCode = hashCode * 8191 + key.hashCode();
 hashCode = hashCode * 8191 + ((is_set_userName()) ? 131071 : 524287);
 if (is_set_userName())
  hashCode = hashCode * 8191 + userName.hashCode();
 hashCode = hashCode * 8191 + org.apache.storm.thrift.TBaseHelper.hashCode(expirationTimeMillis);
 return hashCode;
}

代码示例来源:origin: apache/storm

@Override
public int hashCode() {
 int hashCode = 1;
 hashCode = hashCode * 8191 + ((is_set_serviceType()) ? 131071 : 524287);
 if (is_set_serviceType())
  hashCode = hashCode * 8191 + serviceType.getValue();
 hashCode = hashCode * 8191 + ((is_set_info()) ? 131071 : 524287);
 if (is_set_info())
  hashCode = hashCode * 8191 + info.hashCode();
 hashCode = hashCode * 8191 + ((is_set_signature()) ? 131071 : 524287);
 if (is_set_signature())
  hashCode = hashCode * 8191 + signature.hashCode();
 return hashCode;
}

代码示例来源:origin: aws/aws-sdk-java

@Override
public int hashCode() {
  final int prime = 31;
  int hashCode = 1;
  hashCode = prime * hashCode + ((getUserPoolId() == null) ? 0 : getUserPoolId().hashCode());
  hashCode = prime * hashCode + ((getClientId() == null) ? 0 : getClientId().hashCode());
  hashCode = prime * hashCode + ((getCSS() == null) ? 0 : getCSS().hashCode());
  hashCode = prime * hashCode + ((getImageFile() == null) ? 0 : getImageFile().hashCode());
  return hashCode;
}

代码示例来源:origin: aws/aws-sdk-java

@Override
public int hashCode() {
  final int prime = 31;
  int hashCode = 1;
  hashCode = prime * hashCode + ((getSecretId() == null) ? 0 : getSecretId().hashCode());
  hashCode = prime * hashCode + ((getClientRequestToken() == null) ? 0 : getClientRequestToken().hashCode());
  hashCode = prime * hashCode + ((getSecretBinary() == null) ? 0 : getSecretBinary().hashCode());
  hashCode = prime * hashCode + ((getSecretString() == null) ? 0 : getSecretString().hashCode());
  hashCode = prime * hashCode + ((getVersionStages() == null) ? 0 : getVersionStages().hashCode());
  return hashCode;
}

代码示例来源:origin: aws/aws-sdk-java

@Override
public int hashCode() {
  final int prime = 31;
  int hashCode = 1;
  hashCode = prime * hashCode + ((getRestApiId() == null) ? 0 : getRestApiId().hashCode());
  hashCode = prime * hashCode + ((getMode() == null) ? 0 : getMode().hashCode());
  hashCode = prime * hashCode + ((getFailOnWarnings() == null) ? 0 : getFailOnWarnings().hashCode());
  hashCode = prime * hashCode + ((getParameters() == null) ? 0 : getParameters().hashCode());
  hashCode = prime * hashCode + ((getBody() == null) ? 0 : getBody().hashCode());
  return hashCode;
}

代码示例来源:origin: aws/aws-sdk-java

@Override
public int hashCode() {
  final int prime = 31;
  int hashCode = 1;
  hashCode = prime * hashCode + ((getRegistryId() == null) ? 0 : getRegistryId().hashCode());
  hashCode = prime * hashCode + ((getRepositoryName() == null) ? 0 : getRepositoryName().hashCode());
  hashCode = prime * hashCode + ((getUploadId() == null) ? 0 : getUploadId().hashCode());
  hashCode = prime * hashCode + ((getPartFirstByte() == null) ? 0 : getPartFirstByte().hashCode());
  hashCode = prime * hashCode + ((getPartLastByte() == null) ? 0 : getPartLastByte().hashCode());
  hashCode = prime * hashCode + ((getLayerPartBlob() == null) ? 0 : getLayerPartBlob().hashCode());
  return hashCode;
}

相关文章