Creates a RegularImmutableMap from the first n entries in entryArray.  This implementation
may replace the entries in entryArray with its own entry objects (though they will have the
same key/value contents), and may take ownership of entryArray.
347047
static <K, V> RegularImmutableMap<K, V> fromEntryArray(int n, Entry<K, V>[] entryArray) {
    checkPositionIndex(n, entryArray.length);
    Entry<K, V>[] entries;
    if (n == entryArray.length) {
      entries = entryArray;
    } else {
      entries = createEntryArray(n);
    }
    int tableSize = Hashing.closedTableSize(n, MAX_LOAD_FACTOR);
    ImmutableMapEntry<K, V>[] table = createEntryArray(tableSize);
    int mask = tableSize - 1;
    for (int entryIndex = 0; entryIndex < n; entryIndex++) {
      Entry<K, V> entry = entryArray[entryIndex];
      K key = entry.getKey();
      V value = entry.getValue();
      checkEntryNotNull(key, value);
      int tableIndex = Hashing.smear(key.hashCode()) & mask;
      @Nullable ImmutableMapEntry<K, V> existing = table[tableIndex];
      // prepend, not append, so the entries can be immutable
      ImmutableMapEntry<K, V> newEntry;
      if (existing == null) {
        boolean reusable =
            entry instanceof ImmutableMapEntry && ((ImmutableMapEntry<K, V>) entry).isReusable();
        newEntry =
            reusable ? (ImmutableMapEntry<K, V>) entry : new ImmutableMapEntry<K, V>(key, value);
      } else {
        newEntry = new NonTerminalImmutableMapEntry<K, V>(key, value, existing);
      }
      table[tableIndex] = newEntry;
      entries[entryIndex] = newEntry;
      checkNoConflictInKeyBucket(key, newEntry, existing);
    }
    return new RegularImmutableMap<K, V>(entries, table, mask);
  }
288872
private Object newMap(Object obj, Element node) throws Exception {
		String id = getAttribute(node, "id");

		Map<Object, Object> map = new HashMap<>();
		if (id != null) {
			_idMap.put(id, map);
		}

		Element[] children = getChildren(node);
		for (int i = 0; i < children.length; i++) {

			Element element = children[i];

			if (!element.getTagName().equals("Entry")) {
				throw new IllegalStateException("Not an Entry");
			}

			Element key = null;
			Element value = null;

			Element[] entries = getChildren(element);
			for (int j = 0; j < entries.length; j++) {
				Element item = entries[j];
				if (!item.getTagName().equals("Item")) {
					throw new IllegalStateException("Not an Item");
				}
				if (key == null) {
					key = item;
				} else {
					value = item;
				}
			}

			if (key == null || value == null) {
				throw new IllegalStateException("Missing Item in Entry");
			}
			String kid = getAttribute(key, "id");
			String vid = getAttribute(value, "id");

			Object k = value(obj, key);
			Object v = value(obj, value);
			map.put(k, v);

			if (kid != null) {
				_idMap.put(kid, k);
			}
			if (vid != null) {
				_idMap.put(vid, v);
			}
		}

		return map;
	}
225914
@Override
  public Set<Map.Entry<K, V>> entrySet() {
    if (lazyEntrySet == null) {
      lazyEntrySet = new EntrySet();
    }
    return lazyEntrySet;
  }
1154592
private OriginalMapping getOriginalMappingForEntry(Entry entry) {
    if (entry.getSourceFileId() == UNMAPPED) {
      return null;
    } else {
      // Adjust the line/column here to be start at 1.
      Builder x = OriginalMapping.newBuilder()
        .setOriginalFile(sources[entry.getSourceFileId()])
        .setLineNumber(entry.getSourceLine() + 1)
        .setColumnPosition(entry.getSourceColumn() + 1);
      if (entry.getNameId() != UNMAPPED) {
        x.setIdentifier(names[entry.getNameId()]);
      }
      return x.build();
    }
  }
1324537
private static <K, V> Map.Entry<K, V> createEntry(K key, V value) {
		return new Map.Entry<K, V>() {
			@Override
			public K getKey() {
				return key;
			}

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

			@Override
			public V setValue(V value) {
				throw new UnsupportedOperationException();
			}
		};
	}
464000
public static <K, V> Map.Entry<K, V> immutableEntry(K key, V value) {
      return new ImmutableEntry<>(key, value);
   }
1232516
Entry[] reuseChunkArray() {
    Entry[] ea = evictChunkReuse;
    if (ea != null) {
      evictChunkReuse = null;
    } else {
      ea = new Entry[chunkSize];
    }
    return ea;
  }
1001215
static <K, V> ImmutableMapEntry<K, V> entryOf(K key, V value) {
    return new ImmutableMapEntry<K, V>(key, value);
  }
360730
@SuppressWarnings("ConstantConditions")
  ImmutableSetMultimap<K,V> toImmutableSetMultimap() {
    final ImmutableSetMultimap.Builder<K, V>  ret = ImmutableSetMultimap.builder();

    for (final MultimapEntry<K, V> entry : entries) {
      ret.putAll(entry.key, entry.values);
    }

    return ret.build();
  }
1143454
@SuppressWarnings("ConstantConditions")
  private ImmutableMap<K,V> toRegularImmutableMap() {
    final ImmutableMap.Builder<K, V>  ret = ImmutableMap.builder();

    for (final MapEntry<K, V> entry : entries) {
      ret.put(entry.key, entry.value);
    }

    return ret.build();
  }
1234000
private static <K, V> SortedMap<K, V> filterFiltered(
      FilteredEntrySortedMap<K, V> map, Predicate<? super Entry<K, V>> entryPredicate) {
    Predicate<Entry<K, V>> predicate = Predicates.<Entry<K, V>>and(map.predicate, entryPredicate);
    return new FilteredEntrySortedMap<K, V>(map.sortedMap(), predicate);
  }
408531
@SafeVarargs
    private static Map<Pattern, Pass> asMap(
        final Map.Entry<Pattern, Pass>... entries) {
        final Map<Pattern, Pass> map = new HashMap<>(entries.length);
        for (final Map.Entry<Pattern, Pass> ent : entries) {
            map.put(ent.getKey(), ent.getValue());
        }
        return map;
    }
499043
public Set<Map.Entry<A,B>> entrySet() {
	return new AbstractSet<Map.Entry<A,B>>() {
	    public int size() {
		return map.size();
	    }
	    public Iterator<Map.Entry<A,B>> iterator() {
		return new Iterator<Map.Entry<A,B>>() {
		    private final Iterator<Map.Entry<A,B>> it = map.entrySet().iterator();
		    private Map.Entry<A,B> last = null;
		    public boolean hasNext() {
			return it.hasNext(); 
		    }
		    public Map.Entry<A,B> next() { 
		        last = it.next();
			return last;
		    }
		    public void remove() {
			it.remove();
			revMap.remove(last.getValue());
		    }
		};
	    }
	    public boolean remove(Object o) {
		if(!(o instanceof Map.Entry/*<A,B>*/)) return false;
		@SuppressWarnings("unchecked")
		Map.Entry<A,B> entry = (Map.Entry<A,B>) o;
		B currValue = BijMap.this.get(entry.getKey());
		if((currValue == null) || !currValue.equals(entry.getValue())) return false;
		BijMap.this.remove(entry.getKey());
		return true;
	    }
	    public void clear() {
		BijMap.this.clear();
	    }
	};
    }
182043
def create_entries
      seen = Set.new
      Looksee.adapter.lookup_modules(object).map do |mod|
        entry = Entry.new(mod, seen)
        seen += entry.methods.keys
        entry
      end
    end
1083645
public static Map mapEntries(Mapper mapper, Map map) {
        return mapEntries(mapper, map, false);
    }
1280740
@SuppressWarnings("ConstantConditions")
  ImmutableListMultimap<K,V> toImmutableListMultimap() {
    final ImmutableListMultimap.Builder<K, V>  ret = ImmutableListMultimap.builder();

    for (final MultimapEntry<K, V> entry : entries) {
      ret.putAll(entry.key, entry.values);
    }

    return ret.build();
  }
794977
@SuppressWarnings("unchecked") // Safe as long as the javadocs are followed
  static <K, V> ImmutableMapEntry<K, V>[] createEntryArray(int size) {
    return new ImmutableMapEntry[size];
  }