Look up an Edge by its id.

@param id
the id of the edge to look up
@return the Edge, or null if no matching Edge was found
173922
public Edge lookupEdgeById(int id) {
        Iterator<Edge> i = edgeIterator();
        while (i.hasNext()) {
            Edge edge = i.next();
            if (edge.getId() == id) {
                return edge;
            }
        }
        return null;
    }
703468
protected int nextEdgeId() {
        int nextEdge = edgeCount;
        edgeCount++;
        if (edgeCount < 0)
            throw new IllegalStateException("too many edges. new edge id would be negative. " + toString());

        edges.ensureCapacity(((long) edgeCount + 1) * edgeEntryBytes);
        return nextEdge;
    }
1142278
@Override
  public InetSocketAddress lookup(final Identifier id) {
    LOG.log(Level.FINE, "id: {0}", id);
    return idToAddrMap.get(id);
  }
521203
def get_index_by_id(self, id):
        """"""
        for i in range(len(self.vertices)):
            if self.vertices[i].id == id:
                return i
        raise ValueError('Reverse look up of id failed.')
934460
function(id) {
            for (var i in this.ids) {
                if (this.ids[i][id]) {
                    return this.ids[i][id];
                }
            }
            return null;
        }
15858
public Element getIdElement(String id) {
    WeakReference<Element> ref = objWithId.get(id);
    return (ref != null) ? ref.get() : null;
  }
146034
@Nullable
    public Relationship getRelationship(@Nonnull String id) {
        if (id == null || id.trim().length() == 0) {
            throw new IllegalArgumentException("A relationship ID must be specified.");
        }

        return relationshipsById.get(id);
    }
634700
public User getUserById(int id) {
		for (User u : users)
			if (u.getId() == id)
				return u;
		return null;
	}
1101608
@Override
    public int compareTo(final Id id) {
        return Integer.valueOf(this.id).compareTo(id.id);
    }
808678
public QueryTreeElement getQuery(String id) {
		for (QueryTreeElement query : queries) {
			if (query.getID().equals(id)) {
				return query;
			}
		}
		return null;
	}
1169671
public Object getObjectWithId( IdKey id ) {
        if ( null != idToObject ) {
            return idToObject.get( id );
        }
        return null;
    }
185954
public static Feature createBounds(final String id) {
        final Feature feature = new Feature();
        feature.setId(id);
        feature.setGeometry(new Polygon());
        return feature;
    }
135876
def delete_edge_by_id(self, edge_id):
        """"""
        edge = self.get_edge(edge_id)

        # Remove the edge from the "from node"
        # --Determine the from node
        from_node_id = edge['vertices'][0]
        from_node = self.get_node(from_node_id)

        # --Remove the edge from it
        from_node['edges'].remove(edge_id)

        # Remove the edge from the "to node"
        to_node_id = edge['vertices'][1]
        to_node = self.get_node(to_node_id)

        # --Remove the edge from it
        to_node['edges'].remove(edge_id)

        # Remove the edge from the edge list
        del self.edges[edge_id]

        self._num_edges -= 1
1193713
public DrawerProfile findProfileById(long id) {
        for (DrawerProfile profile : mProfileAdapter.getItems()) {
            if (profile.getId() == id) {
                return profile;
            }
        }
        return null;
    }
1291912
public SimpleOrderedMap<Object> check(String id) throws IOException {
    if (idToVersion.containsKey(id)) {
      String version = idToVersion.get(id);
      MtasSolrCollectionCacheItem item = versionToItem.get(version);
      Date date = new Date();
      long now = date.getTime();
      if (verify(version, now)) {
        SimpleOrderedMap<Object> data = new SimpleOrderedMap<>();
        data.add("now", now);
        data.add("id", item.id);
        data.add("size", item.size);
        data.add("version", version);
        data.add("expiration", expirationVersion.get(version));
        return data;
      } else {
        idToVersion.remove(id);
        versionToItem.remove(version);
        expirationVersion.remove(version);
        return null;
      }
    } else {
      return null;
    }
  }
630755
public T setId(int id) {
    Preconditions.checkState(this.id == null);
    this.id = id;
    return (T) this;
  }
1248633
public Point removePoint(String id) {
        Point removePoint = null;
        for (Point point : points)
            if (id.equals(point.getId()))
                removePoint = point;
        if (removePoint != null)
            points.remove(removePoint);
        return removePoint;
    }