code: public List<GeometryIndex> getAdjacentEdges(Geometry geometry, GeometryIndex index)
  			throws GeometryIndexNotFoundException {
  		if (geometry == null || index == null) {
  			throw new IllegalArgumentException("No null values allowed!");
  		}
  		GeometryIndexCombo combo = recursiveSearch(geometry, index);
  		int[] indices = new int[] {};
  		if (isVertex(index)) {
  			indices = getAdjacentEdgesForVertex(combo.getGeometry(), combo.getIndex());
  		} else if (isEdge(index)) {
  			indices = getAdjacentEdgesForEdge(combo.getGeometry(), combo.getIndex());
  		}
  
  		List<GeometryIndex> indexList = new ArrayList<GeometryIndex>();
  		for (int indice : indices) {
  			indexList.add(recursiveCreate(index, indice, GeometryIndexType.TYPE_EDGE));
  		}
  
  		// Can return an empty list.
  		return indexList;
  	}
docs: Given a certain geometry and index, find the neighboring edges. It is important to understand that searching
  edges within a closed ring will always return 2 results (unless the ring contains only 1 or 2 coordinates), while
  searching within a LineString can yield different results (the beginning or end only has 1 neighbor).
  
  @param geometry
  The geometry wherein to search for neighboring edges.
  @param index
  The index to start out from. Must point to either a vertex or and edge.
  @return The list of neighboring edges.
  @throws GeometryIndexNotFoundException
  Thrown in case the given index does not match the given geometry.