List<GraphCommit<CommitId>> () { return new AbstractList<>() { @Override public GraphCommit<CommitId> get(int index) { CommitId commitId = myPermanentCommitsInfo.getCommitId(index); List<Integer> downNodes = LinearGraphUtils.getDownNodesIncludeNotLoad(myPermanentLinearGraph, index); List<CommitId> parentsCommitIds = myPermanentCommitsInfo.convertToCommitIdList(downNodes); return GraphCommitImpl.createCommit(commitId, parentsCommitIds, myPermanentCommitsInfo.getTimestamp(index)); } @Override public int size() { return myPermanentLinearGraph.nodesCount(); } }; }