/** * @param n * @return */ protected int hashNode( Node n ) { return (n.hashCode() & 0x7fffffff) % elements.length; }
/** Return the munged hashCodes of the specified nodes, an exclusive-or of the slightly-shifted component hashcodes; this means (almost) all of the bits count, and the order matters, so (S @P O) has a different hash from (O @P S), etc. */ public static int hashCode( Node s, Node p, Node o ) { return (s.hashCode() >> 1) ^ p.hashCode() ^ (o.hashCode() << 1); }
@Override public int hashCode() { return node.hashCode() ^ hashLink ; } }
@Override public int hashCode() { return node.hashCode() ^ hashLink ; } }
@Override public int hashCode() { return node.hashCode() ^ hashRevLink ; } }
@Override public int hashCode() { return node.hashCode() ^ hashRevLink ; } }
/** hash function override */ @Override public int hashCode() { int hash = 0; for (int i = 0; i < environment.length; i++) { Node n = environment[i]; hash = (hash << 1) ^ (n == null ? 0x537c: n.hashCode()); } return hash; }
/** hash function override */ @Override public int hashCode() { int hash = 0; if (!(subject instanceof Node_RuleVariable)) hash ^= (subject.hashCode() >> 1); if (!(predicate instanceof Node_RuleVariable)) hash ^= predicate.hashCode(); if (!(object instanceof Node_RuleVariable)) hash ^= (object.hashCode() << 1); return hash; // return (subject.hashCode() >> 1) ^ predicate.hashCode() ^ (object.hashCode() << 1); }
@Override public int hashCode() { return TagFetch.hashCode() ^ node.hashCode() ; }
@Override public int hashCode() { return uri.hashCode() ^ getSubOp().hashCode() ; }
@Override public int hashCode() { final int prime = 31 ; int result = 1 ; result = prime * result + ((decl == null) ? 0 : decl.hashCode()) ; // OK since a URI. result = prime * result + ((graphIRI == null) ? 0 : graphIRI.hashCode()) ; return result ; }
@Override public int hashCode() { return uri.hashCode() ^ getSubOp().hashCode() ; }
private static int hashNode(Node node) { if ( node.isBlank() ) return 59 ; return node.hashCode() ; }
@Override public int hashCode() { if ( isNode() ) return arg.hashCode() ; return argList.hashCode() ; }
@Override public int hashCode() { int x = procId.hashCode() ; x ^= args.hashCode() ; x ^= getSubOp().hashCode() ; return x ; }
public static int hashCode(Binding bind) { int hash = 0xC0 ; for ( Iterator<Var> iter = bind.vars() ; iter.hasNext() ; ) { Var var = iter.next() ; Node node = bind.get(var) ; hash ^= var.hashCode() ; hash ^= node.hashCode() ; } return hash ; }
protected String resource(Node rsrc) { if (rsrc.isBlank()) { return "http://marklogic.com/semantics/blank/" + Long.toHexString( fuse(scramble((long)rsrc.hashCode()),fuse(scramble(milliSecs),randomValue))); } else { return escapeXml(rsrc.toString()); } }