Java Code Examples for org.antlr.v4.runtime.misc.MurmurHash#finish()
The following examples show how to use
org.antlr.v4.runtime.misc.MurmurHash#finish() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: FeatureVectorAsObject.java From codebuff with BSD 2-Clause "Simplified" License | 5 votes |
@Override public int hashCode() { int hash = MurmurHash.initialize(); int n = 0; for (int i = 0; i<features.length-3; i++) { // don't include INFO if ( featureMetaData!=null && featureMetaData[i]==FeatureMetaData.UNUSED ) continue; n++; int feature = features[i]; hash = MurmurHash.update(hash, feature); } return MurmurHash.finish(hash, n); }
Example 2
Source File: Quad.java From codebuff with BSD 2-Clause "Simplified" License | 5 votes |
@Override public int hashCode() { int hash = MurmurHash.initialize(); hash = MurmurHash.update(hash, a); hash = MurmurHash.update(hash, b); hash = MurmurHash.update(hash, c); hash = MurmurHash.update(hash, d); return MurmurHash.finish(hash, 4); }
Example 3
Source File: ParentSiblingListKey.java From codebuff with BSD 2-Clause "Simplified" License | 5 votes |
@Override public int hashCode() { int hash = MurmurHash.initialize(); hash = MurmurHash.update(hash, parentRuleIndex); hash = MurmurHash.update(hash, parentRuleAlt); hash = MurmurHash.update(hash, childRuleIndex); hash = MurmurHash.update(hash, childRuleAlt); hash = MurmurHash.update(hash, separatorTokenType); return MurmurHash.finish(hash, 5); }
Example 4
Source File: RuleAltKey.java From codebuff with BSD 2-Clause "Simplified" License | 5 votes |
@Override public int hashCode() { int hash = MurmurHash.initialize(); hash = MurmurHash.update(hash, ruleName); hash = MurmurHash.update(hash, altNum); return MurmurHash.finish(hash, 2); }
Example 5
Source File: ContextGetterDecl.java From codebuff with BSD 2-Clause "Simplified" License | 5 votes |
@Override public int hashCode() { int hash = MurmurHash.initialize(); hash = MurmurHash.update(hash, name); hash = MurmurHash.update(hash, getArgType()); hash = MurmurHash.finish(hash, 2); return hash; }
Example 6
Source File: ANTLRv4LexerState.java From intellij-plugin-v4 with BSD 3-Clause "New" or "Revised" License | 5 votes |
@Override protected int hashCodeImpl() { int hash = MurmurHash.initialize(); hash = MurmurHash.update(hash, getMode()); hash = MurmurHash.update(hash, getModeStack()); hash = MurmurHash.update(hash, getCurrentRuleType()); return MurmurHash.finish(hash, 3); }
Example 7
Source File: ANTLRLexerState.java From antlr4-intellij-adaptor with BSD 2-Clause "Simplified" License | 4 votes |
protected int hashCodeImpl() { int hash = MurmurHash.initialize(); hash = MurmurHash.update(hash, mode); hash = MurmurHash.update(hash, modeStack); return MurmurHash.finish(hash, 2); }