SimpleCommit<String> (@NotNull String commitHash, String @NotNull [] parentsHashes) { int timestamp = CommitParser.createHash(commitHash); List<String> parents = new ArrayList<>(); for (String parentsHash : parentsHashes) { if (parentsHash.length() > 0) { parents.add(parentsHash); } } return new SimpleCommit<>(commitHash, parents, timestamp); }