本文整理了Java中org.modeshape.common.util.HashCode.compute()
方法的一些代码示例,展示了HashCode.compute()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。HashCode.compute()
方法的具体详情如下:
包路径:org.modeshape.common.util.HashCode
类名称:HashCode
方法名:compute
[英]Compute a combined hash code from the supplied objects. This method always returns 0 if no objects are supplied.
[中]从提供的对象计算组合哈希代码。如果未提供任何对象,此方法始终返回0。
代码示例来源:origin: org.modeshape/modeshape-graph
/**
* {@inheritDoc}
*
* @see java.lang.Object#hashCode()
*/
@Override
public int hashCode() {
return HashCode.compute(at, workspaceName);
}
代码示例来源:origin: org.modeshape/modeshape-graph
/**
* {@inheritDoc}
*
* @see java.lang.Object#hashCode()
*/
@Override
public int hashCode() {
return HashCode.compute(on, workspaceName);
}
代码示例来源:origin: org.modeshape/modeshape-repository
public RepositoryNodePath( String repositorySourceName,
String workspaceName,
String nodePath ) {
this.repositorySourceName = repositorySourceName;
this.workspaceName = workspaceName;
this.nodePath = nodePath;
this.hc = HashCode.compute(this.repositorySourceName, this.workspaceName, this.nodePath);
}
代码示例来源:origin: org.teiid.modeshape/teiid-modeshape-sequencer-vdb
/**
* @see java.lang.Object#hashCode()
*/
@Override
public int hashCode() {
return HashCode.compute(this.name, this.namespacePrefix, this.namespaceUri, this.value);
}
代码示例来源:origin: org.modeshape/modeshape-graph
/**
* {@inheritDoc}
*
* @see java.lang.Object#hashCode()
*/
@Override
public int hashCode() {
return HashCode.compute(under, childName, workspaceName);
}
代码示例来源:origin: org.fcrepo/modeshape-common
/**
* {@inheritDoc}
*
* @see java.lang.Object#hashCode()
*/
@Override
public int hashCode() {
return HashCode.compute(this.category, this.name, this.label);
}
代码示例来源:origin: org.modeshape/modeshape-graph
/**
* {@inheritDoc}
*
* @see java.lang.Object#hashCode()
*/
@Override
public int hashCode() {
return HashCode.compute(at, workspaceName);
}
代码示例来源:origin: org.modeshape/modeshape-graph
/**
* {@inheritDoc}
*
* @see java.lang.Object#hashCode()
*/
@Override
public int hashCode() {
return HashCode.compute(startingAfter, workspaceName);
}
代码示例来源:origin: org.fcrepo/modeshape-jcr
/**
* @param name the segment name
* @throws IllegalArgumentException if the name is null or if the index is invalid
*/
public BasicPathSegment( Name name ) {
assert name != null;
this.name = name;
this.index = Path.DEFAULT_INDEX;
hc = HashCode.compute(name, index);
}
代码示例来源:origin: org.fcrepo/modeshape-jcr
protected Matcher( PathExpression.Matcher inputMatcher,
WorkspacePath outputPath ) {
this.inputMatcher = inputMatcher;
this.outputPath = outputPath;
this.hc = HashCode.compute(super.hashCode(), this.outputPath);
}
代码示例来源:origin: ModeShape/modeshape
protected Matcher( PathExpression.Matcher inputMatcher,
WorkspacePath outputPath ) {
this.inputMatcher = inputMatcher;
this.outputPath = outputPath;
this.hc = HashCode.compute(super.hashCode(), this.outputPath);
}
代码示例来源:origin: org.modeshape/modeshape-graph
/**
* {@inheritDoc}
*
* @see java.lang.Object#hashCode()
*/
@Override
public int hashCode() {
return HashCode.compute(on, workspaceName, property.getName());
}
代码示例来源:origin: org.modeshape/modeshape-graph
/**
* {@inheritDoc}
*
* @see java.lang.Object#hashCode()
*/
@Override
public int hashCode() {
return HashCode.compute(at, workspaceName, lockScope(), lockTimeoutInMillis);
}
代码示例来源:origin: ModeShape/modeshape
protected SequencerPathExpression( PathExpression selectExpression,
String outputExpression ) {
CheckArg.isNotNull(selectExpression, "select expression");
this.selectExpression = selectExpression;
this.outputExpression = outputExpression != null ? outputExpression.trim() : DEFAULT_OUTPUT_EXPRESSION;
this.hc = HashCode.compute(this.selectExpression, this.outputExpression);
}
代码示例来源:origin: org.fcrepo/modeshape-jcr
protected SequencerPathExpression( PathExpression selectExpression,
String outputExpression ) {
CheckArg.isNotNull(selectExpression, "select expression");
this.selectExpression = selectExpression;
this.outputExpression = outputExpression != null ? outputExpression.trim() : DEFAULT_OUTPUT_EXPRESSION;
this.hc = HashCode.compute(this.selectExpression, this.outputExpression);
}
代码示例来源:origin: org.fcrepo/modeshape-jcr
public BasicName( String namespaceUri,
String localName ) {
CheckArg.isNotNull(localName, "localName");
this.namespaceUri = namespaceUri != null ? namespaceUri.trim() : "";
this.localName = trimNonEmptyStrings(localName);
this.hc = HashCode.compute(this.namespaceUri, this.localName);
}
代码示例来源:origin: org.fcrepo/modeshape-jcr
public And( Constraint left,
Constraint right ) {
CheckArg.isNotNull(left, "left");
CheckArg.isNotNull(right, "right");
this.left = left;
this.right = right;
this.hc = HashCode.compute(this.left, this.right);
}
代码示例来源:origin: org.modeshape/modeshape-graph
public And( Constraint left,
Constraint right ) {
CheckArg.isNotNull(left, "left");
CheckArg.isNotNull(right, "right");
this.left = left;
this.right = right;
this.hc = HashCode.compute(this.left, this.right);
}
代码示例来源:origin: org.fcrepo/modeshape-jcr
public Comparison( DynamicOperand operand1,
Operator operator,
StaticOperand operand2 ) {
CheckArg.isNotNull(operand1, "operand1");
CheckArg.isNotNull(operator, "operator");
CheckArg.isNotNull(operand2, "operand2");
this.operand1 = operand1;
this.operand2 = operand2;
this.operator = operator;
this.hc = HashCode.compute(this.operand1, this.operand2, this.operator);
}
代码示例来源:origin: ModeShape/modeshape
@Test
public void shouldAcceptNullArguments() {
assertThat(HashCode.compute((Object)null), is(0));
assertThat(HashCode.compute("abc", (Object)null), is(not(0)));
}
内容来源于网络,如有侵权,请联系作者删除!