Example usage for java.util Map.Entry hashCode

List of usage examples for java.util Map.Entry hashCode

Introduction

In this page you can find the example usage for java.util Map.Entry hashCode.

Prototype

int hashCode();

Source Link

Document

Returns the hash code value for this map.

Usage

From source file:Main.java

public static void main(String args[]) {
    System.out.println("PATH = " + System.getenv("PATH"));

    Map<String, String> env = System.getenv();
    for (Iterator<Map.Entry<String, String>> it = env.entrySet().iterator(); it.hasNext();) {
        Map.Entry<String, String> entry = it.next();
        System.out.println(entry.hashCode());
    }/*  ww w  .  ja va2s .  c  o m*/
}

From source file:com.github.helenusdriver.commons.collections.iterators.SnapshotIterator.java

/**
 * Instantiates a new <code>SnapshotEntry</code> object.
 *
 * @author paouelle/* ww w. ja  va  2 s.  com*/
 *
 * @param  e the entry to be cloned
 * @throws NullPointerException if <code>e</code> is <code>null</code>
 */
SnapshotEntry(Map.Entry<K, V> e) {
    org.apache.commons.lang3.Validate.notNull(e, "invalid null entry");
    this.hash = e.hashCode();
    this.key = e.getKey();
    this.value = e.getValue();
}