Java 8 Map.Entry - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Java 8 Map.Entry class.

This code example shows how to use the following methods: getKey, getValue
		key = iKey;
		value = iValue;
	} 
 
	public OPair(final Entry<K, V> iSource) {
		key = iSource.getKey();
		value = iSource.getValue();
	} 
 
	public void init(final K iKey, final V iValue) {
		key = iKey;
		value = iValue;
	} 
 
	public K getKey() { 
		return key;
	} 
 
	public V getValue() { 
		return value;
Full Snippet Info
8
CodeRank
Stop searching for code, let great code find you!  Add Codota to your java IDE
This code example shows how to use the following methods: getKey, getValue
	 *  
	 * @param entry 
	 *          the entry to copy 
	 */ 
	public OSimpleImmutableEntry(final Entry<? extends K, ? extends V> entry) {
		this.key = entry.getKey();
		this.value = entry.getValue();
	} 
 
	/** 
	 * Returns the key corresponding to this entry. 
	 *  
	 * @return the key corresponding to this entry 
	 */ 
	public K getKey() { 
		return key;
	} 
 
	/** 
	 * Returns the value corresponding to this entry. 
Full Snippet Info
7
CodeRank
Stop searching for code, let great code find you!  Add Codota to your java IDE
This code example shows how to use the following methods: getKey, getValue
 
    @Override 
    public boolean process(final Entry<BytesKey, OpItem> eldest) {
        try { 
            // ³¢ÊÔ´æÈë´ÅÅÌ 
            return this.diskMap.put(eldest.getKey(), eldest.getValue());
        } 
        catch (final IOException e) {
            e.printStackTrace();
            log.error("дÈë´ÅÅÌ»º´æʧ°Ü", e);
        } 
        return false; 
    } 
 
} 
Full Snippet Info
7
CodeRank
Stop searching for code, let great code find you!  Add Codota to your java IDE
This code example shows how to use the following methods: getKey, getValue
            } 
 
            @Override 
            public boolean equals(Object obj) { 
                return obj instanceof Map.Entry
                        && key.equals(((Map.Entry<?, ?>) obj).getKey())
                        && value.equals(((Map.Entry<?, ?>) obj).getValue());
            } 
 
            @Override 
            public int hashCode() { 
                return 127 * ("key".hashCode() ^ key.hashCode())
                        + 127 * ("value".hashCode() ^ value.hashCode());
            } 
 
            @Override 
            public String toString() {
                return "MapEntry(" + key + ", " + value + ")";
            } 
        } 
Full Snippet Info
7
CodeRank
Stop searching for code, let great code find you!  Add Codota to your java IDE
This code example shows how to use the following methods: getValue
  public boolean remove(@Nullable Object o) {
    Predicate<? super Entry<K, V>> entryPredicate = multimap.entryPredicate();
    for (Iterator<Entry<K, V>> unfilteredItr = multimap.unfiltered().entries().iterator();
        unfilteredItr.hasNext();) {
      Map.Entry<K, V> entry = unfilteredItr.next();
      if (entryPredicate.apply(entry) && Objects.equal(entry.getValue(), o)) {
        unfilteredItr.remove();
        return true; 
      } 
    } 
    return false; 
  } 
 
  @Override 
  public boolean removeAll(Collection<?> c) {
    return Iterables.removeIf(multimap.unfiltered().entries(),
        // explicit <Entry<K, V>> is required to build with JDK6 
        Predicates.<Entry<K, V>>and(multimap.entryPredicate(),
            Maps.<V>valuePredicateOnEntries(Predicates.in(c))));
  } 
Full Snippet Info
7
CodeRank
Stop searching for code, let great code find you!  Add Codota to your java IDE

Related Java 8 Map.Entry Questions & Answers:

Other Java 8 Map.Entry Examples

82:	     */
83:	    static void unregister(final Context context, final String regId) {
84:	        Log.i(TAG, "unregistering device (regId = " + regId + ")");
85:	        String serverUrl = SERVER_URL + "/unregister";
86:	        Map<String, String> params = new HashMap<String, String>();

Read More

See Code Examples for Java 8 Map.Entry Methods: