Overloads the left shift operator to provide an easy way to append
Map.Entry values to a Map.

@param self  a Map
@param entry a Map.Entry to be added to the Map.
@return same map, after the value has been added to it.
@since 1.6.0
517316
public static <K, V> Map<K, V> leftShift(Map<K, V> self, Map.Entry<K, V> entry) {
        self.put(entry.getKey(), entry.getValue());
        return self;
    }
1225247
public static StringBuilder appendKeyDqValue(final StringBuilder sb, final Entry<String, String> entry) {
        return appendKeyDqValue(sb, entry.getKey(), entry.getValue());
    }
391412
public Set<Map.Entry<E,Double>> entrySet() {
    return new AbstractSet<Map.Entry<E,Double>>() {
      @Override
      public Iterator<Entry<E, Double>> iterator() {
        return new Iterator<Entry<E,Double>>() {
          final Iterator<Entry<E,MutableInteger>> inner = map.entrySet().iterator();

          public boolean hasNext() {
            return inner.hasNext();
          }

          public Entry<E, Double> next() {
            return new Map.Entry<E,Double>() {
              final Entry<E,MutableInteger> e = inner.next();

              public E getKey() {
                return e.getKey();
              }

              public Double getValue() {
                return e.getValue().doubleValue();
              }

              public Double setValue(Double value) {
                final double old = e.getValue().doubleValue();
                e.getValue().set(value.intValue());
                totalCount = totalCount - (int)old + value.intValue();
                return old;
              }
            };
          }

          public void remove() {
            throw new UnsupportedOperationException();
          }
        };
      }

      @Override
      public int size() {
        return map.size();
      }
    };
  }
597438
public boolean add(E entry)
	{
		super.add(entry);
		
		if(this.size() > this.maxSize)
		{
			super.removeRange(0, this.size() - maxSize);
		}
		
		return true;
	}
1001775
public static JPopupMenu leftShift(JPopupMenu self, GString gstr) {
        self.add(gstr.toString());
        return self;
    }
626102
public static OutputStream leftShift(OutputStream self, byte[] value) throws IOException {
        self.write(value);
        self.flush();
        return self;
    }
649955
public static OutputStream leftShift(OutputStream self, InputStream in) throws IOException {
        byte[] buf = new byte[DEFAULT_BUFFER_SIZE];
        for (int count; -1 != (count = in.read(buf)); ) {
            self.write(buf, 0, count);
        }
        self.flush();
        return self;
    }
50592
public Entry insertAtBottom(Entry entry)
  {
    if (tc.isEntryEnabled())
      SibTr.entry(tc, "insertAtBottom", new Object[] { entry });

    //only add in the new entry if it is not already in a list.
    if(entry.parentList == null)
    {
      //if the list is empty
      if(last == null)
      {
        //double check that the link references are null
        entry.previous = null;
        entry.next = null;
        //record the first and last pointers
        first = entry;
        last = entry;
        //set the entry's parent list to show that it is now part of this list
        entry.parentList = this;
      }
      else //if there are already entries in the list
      {
        //insert the new entry after the last one in the list
        insertAfter(entry, last);        
      }            
                 
      if (tc.isEntryEnabled())
        SibTr.exit(tc, "insertAtBottom", entry);
    
      return entry;
    }
    
    //if the entry is already in a list, throw a runtime exception
    SIErrorException e = new SIErrorException(
      nls.getFormattedMessage(
        "INTERNAL_MESSAGING_ERROR_CWSIP0001",
        new Object[] {
          "com.ibm.ws.sib.processor.utils.linkedlist.LinkedList",
          "1:166:1.18" },
        null));
          
    FFDCFilter.processException(
      e,
      "com.ibm.ws.sib.processor.utils.linkedlist.LinkedList.insertAtBottom",
      "1:172:1.18",
      this);
            
    SibTr.exception(tc, e);   
    SibTr.error(tc, "INTERNAL_MESSAGING_ERROR_CWSIP0001",
    new Object[] {
      "com.ibm.ws.sib.processor.utils.linkedlist.LinkedList",
      "1:179:1.18" });   
    
    if (tc.isEntryEnabled())
      SibTr.exit(tc, "insertAtBottom", e);
          
    throw e;
  }
17245
private static Map<?, ?> mapOfEntries( Entry<?, ?>... entries ) {
        Map<Object, Object> looseTypedMap = new LinkedHashMap<>( entries.length );
        for (Entry<?, ?> entry : entries)
            looseTypedMap.put(entry.getKey(), entry.getValue());
        return looseTypedMap;
    }
600369
public static @Nonnull Entry<String,JsonElement> field(String key, JsonElement value) {
        Entry<String, JsonElement> entry = new Entry<String,JsonElement>() {

            @Override
            public String getKey() {
                return key;
            }

            @Override
            public JsonElement getValue() {
                return value;
            }

            @Override
            public JsonElement setValue(JsonElement value) {
                throw new UnsupportedOperationException("entries are immutable");
            }};
            return entry;
    }
452795
public long appendEntry(JournalEntry entry) {
    // TODO(gpang): handle bounding the queue if it becomes too large.

    /**
     * Protocol for appending entries
     *
     * This protocol is lock free, to reduce the overhead in critical sections. It uses
     * {@link AtomicLong} and {@link ConcurrentLinkedQueue} which are both lock-free.
     *
     * The invariant that must be satisfied is that the 'counter' that is returned must be
     * greater than or equal to the actual counter of the entry in the queue.
     *
     * In order to guarantee the invariant, the {@link #mCounter} is incremented before adding the
     * entry to the {@link #mQueue}. AFTER the counter is incremented, whenever the counter is
     * read, it is guaranteed to be greater than or equal to the counter for the queue entries.
     *
     * Therefore, the {@link #mCounter} must be read AFTER the entry is added to the queue. The
     * resulting read of the counter AFTER the entry is added is guaranteed to be greater than or
     * equal to the counter for the entries in the queue.
     */
    mCounter.incrementAndGet();
    mQueue.offer(entry);
    return mCounter.get();
  }
816421
public static StringBuilder leftShift(StringBuilder self, Object value) {
        self.append(value);
        return self;
    }
722979
public static <K, V> Map<K, V> asImmutable(Map<K, V> self) {
        return asUnmodifiable(new LinkedHashMap<K, V>(self));
    }
454924
public void append(Map<?, ?> map) {
		if (map == null || map.size() == 0)
			return;

		for (Map.Entry<?, ?> entry : map.entrySet()) {
			put(StringConverter.toString(entry.getKey()), StringConverter.toNullableString(entry.getValue()));
		}
	}
124903
public static <K,V> V putAt(Map<K,V> self, K key, V value) {
        self.put(key, value);
        return value;
    }
208179
@VisibleForTesting
  ValueReference<K, V> newValueReference(ReferenceEntry<K, V> entry, V value) {
    int hash = entry.getHash();
    return valueStrength.referenceValue(segmentFor(hash), entry, value);
  }
1351496
void add(Entry<String, Point2d[]> entry) {
        if (entry != null) templateMap.put(entry.getKey(), entry.getValue());
    }