GraphEdges (int rowIndex) { int downNeighborIndex = getUpNeighborIndex(rowIndex) + BLOCK_SIZE; if (downNeighborIndex >= myGraph.nodesCount()) { return new GraphEdges(myGraph.nodesCount() - 1); } GraphEdges graphEdges = cacheND.get(downNeighborIndex); if (graphEdges == null) { graphEdges = getDCorrectEdges(downNeighborIndex); cacheND.put(downNeighborIndex, graphEdges); } return graphEdges.copyInstance(); }