Codota Logo
TObjectHashingStrategy
Code IndexAdd Codota to your IDE (free)

How to use
TObjectHashingStrategy
in
gnu.trove

Best Java code snippets using gnu.trove.TObjectHashingStrategy (Showing top 5 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
StringBuilder s =
  • Codota Iconnew StringBuilder()
  • Codota Iconnew StringBuilder(32)
  • Codota IconString str;new StringBuilder(str)
  • Smart code suggestions by Codota
}
origin: de.julielab/jcore-mallet-0.4

/**
 * Locates the index of <tt>obj</tt>.
 *
 * @param obj an <code>Object</code> value
 * @return the index of <tt>obj</tt> or -1 if it isn't in the set.
 */
protected int index(Object obj) {
  int hash, probe, index, length;
  Object[] set;
  Object cur;
  set = _set;
  length = set.length;
  hash = hashingStrategy.computeHashCode(obj) & 0x7fffffff;
  index = hash % length;
  cur = set[index];
  if (cur != null
    && (cur == REMOVED || ! hashingStrategy.equals(cur, obj))) {
    // see Knuth, p. 529
    probe = 1 + (hash % (length - 2));
    do {
      index -= probe;
      if (index < 0) {
        index += length;
      }
      cur = set[index];
    } while (cur != null
         && (cur == REMOVED || ! hashingStrategy.equals(cur, obj)));
  }
  return cur == null ? -1 : index;
}
origin: com.github.adedayo.intellij.sdk/java-psi-api

public static boolean areSignaturesErasureEqual(@NotNull MethodSignature signature1, @NotNull MethodSignature signature2) {
 return METHOD_PARAMETERS_ERASURE_EQUALITY.equals(signature1, signature2);
}
origin: JetBrains/Grammar-Kit

@Override
public int computeHashCode(PsiElement e) {
 if (e instanceof BnfReferenceOrToken || e instanceof BnfLiteralExpression) {
  return e.getText().hashCode();
 }
 return CANONICAL.computeHashCode(e);
}
origin: JetBrains/Grammar-Kit

 @Override
 public boolean equals(PsiElement e1, PsiElement e2) {
  if (e1 instanceof BnfReferenceOrToken && e2 instanceof BnfReferenceOrToken ||
    e1 instanceof BnfLiteralExpression && e2 instanceof BnfLiteralExpression) {
   return e1.getText().equals(e2.getText());
  }
  return CANONICAL.equals(e1, e2);
 }
};
origin: de.julielab/jcore-mallet-0.4

hash = hashingStrategy.computeHashCode(obj) & 0x7fffffff;
index = hash % length;
cur = set[index];
} else if (hashingStrategy.equals(cur, obj)) {
  return -index -1;   // already stored
} else {                // already FULL or REMOVED, must probe
  } while (cur != null
       && cur != REMOVED
       && ! hashingStrategy.equals(cur, obj));
    int firstRemoved = index;
    while (cur != null
        && (cur == REMOVED || ! hashingStrategy.equals(cur, obj))) {
      index -= probe;
      if (index < 0) {
gnu.troveTObjectHashingStrategy

Javadoc

Interface to support pluggable hashing strategies in maps and sets. Implementors can use this interface to make the trove hashing algorithms use object values, values provided by the java runtime, or a custom strategy when computing hashcodes. Created: Sat Aug 17 10:52:32 2002

Most used methods

  • equals
    Compares o1 and o2 for equality. Strategy implementors may use the objects' own equals() methods, co
  • computeHashCode
    Computes a hash code for the specified object. Implementors can use the object's own hashCode method

Popular in Java

  • Making http requests using okhttp
  • setContentView (Activity)
  • compareTo (BigDecimal)
    Compares this BigDecimal with the specified BigDecimal. Two BigDecimal objects that are equal in val
  • setRequestProperty (URLConnection)
    Sets the general request property. If a property with the key already exists, overwrite its value wi
  • System (java.lang)
    Provides access to system-related information and resources including standard input and output. Ena
  • Vector (java.util)
    The Vector class implements a growable array of objects. Like an array, it contains components that
  • ExecutorService (java.util.concurrent)
    An Executor that provides methods to manage termination and methods that can produce a Future for tr
  • Stream (java.util.stream)
    A sequence of elements supporting sequential and parallel aggregate operations. The following exampl
  • IOUtils (org.apache.commons.io)
    General IO stream manipulation utilities. This class provides static utility methods for input/outpu
  • LogFactory (org.apache.commons.logging)
    A minimal incarnation of Apache Commons Logging's LogFactory API, providing just the common Log look
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now