congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
Reference2ReferenceMaps.fastIterator
Code IndexAdd Tabnine to your IDE (free)

How to use
fastIterator
method
in
it.unimi.dsi.fastutil.objects.Reference2ReferenceMaps

Best Java code snippets using it.unimi.dsi.fastutil.objects.Reference2ReferenceMaps.fastIterator (Showing top 3 results out of 315)

origin: it.unimi.dsi/fastutil

/**
 * Returns a hash code for this map.
 *
 * The hash code of a map is computed by summing the hash codes of its entries.
 *
 * @return a hash code for this map.
 */
@Override
public int hashCode() {
  int h = 0, n = size();
  final ObjectIterator<Reference2ReferenceMap.Entry<K, V>> i = Reference2ReferenceMaps.fastIterator(this);
  while (n-- != 0)
    h += i.next().hashCode();
  return h;
}
@Override
origin: it.unimi.dsi/fastutil

  @Override
  public String toString() {
    final StringBuilder s = new StringBuilder();
    final ObjectIterator<Reference2ReferenceMap.Entry<K, V>> i = Reference2ReferenceMaps.fastIterator(this);
    int n = size();
    Reference2ReferenceMap.Entry<K, V> e;
    boolean first = true;
    s.append("{");
    while (n-- != 0) {
      if (first)
        first = false;
      else
        s.append(", ");
      e = i.next();
      if (this == e.getKey())
        s.append("(this map)");
      else
        s.append(String.valueOf(e.getKey()));
      s.append("=>");
      if (this == e.getValue())
        s.append("(this map)");
      else
        s.append(String.valueOf(e.getValue()));
    }
    s.append("}");
    return s.toString();
  }
}
origin: it.unimi.dsi/fastutil

/** {@inheritDoc} */
@SuppressWarnings({"unchecked", "deprecation"})
@Override
public void putAll(final Map<? extends K, ? extends V> m) {
  if (m instanceof Reference2ReferenceMap) {
    ObjectIterator<Reference2ReferenceMap.Entry<K, V>> i = Reference2ReferenceMaps
        .fastIterator((Reference2ReferenceMap<K, V>) m);
    while (i.hasNext()) {
      final Reference2ReferenceMap.Entry<? extends K, ? extends V> e = i.next();
      put(e.getKey(), e.getValue());
    }
  } else {
    int n = m.size();
    final Iterator<? extends Map.Entry<? extends K, ? extends V>> i = m.entrySet().iterator();
    Map.Entry<? extends K, ? extends V> e;
    while (n-- != 0) {
      e = i.next();
      put(e.getKey(), e.getValue());
    }
  }
}
/**
it.unimi.dsi.fastutil.objectsReference2ReferenceMapsfastIterator

Javadoc

Returns an iterator that will be FastEntrySet, if possible, on the Map#entrySet() of the provided map.

Popular methods of Reference2ReferenceMaps

  • singleton
    Returns a type-specific immutable map containing only the specified pair. The returned map is serial
  • unmodifiable
    Returns an unmodifiable type-specific map backed by the given type-specific map.

Popular in Java

  • Reactive rest calls using spring rest template
  • getSystemService (Context)
  • setContentView (Activity)
  • scheduleAtFixedRate (Timer)
  • PrintWriter (java.io)
    Wraps either an existing OutputStream or an existing Writerand provides convenience methods for prin
  • Properties (java.util)
    A Properties object is a Hashtable where the keys and values must be Strings. Each property can have
  • SortedSet (java.util)
    SortedSet is a Set which iterates over its elements in a sorted order. The order is determined eithe
  • TimeZone (java.util)
    TimeZone represents a time zone offset, and also figures out daylight savings. Typically, you get a
  • HttpServletRequest (javax.servlet.http)
    Extends the javax.servlet.ServletRequest interface to provide request information for HTTP servlets.
  • FileUtils (org.apache.commons.io)
    General file manipulation utilities. Facilities are provided in the following areas: * writing to a
  • Best plugins for Eclipse
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now