/** * True if this Version represents a branch */ public boolean isBranch() { return uid.versionTreeID().isBranch(); }
/** * True if this Version represents a branch */ public boolean isBranch() { return uid.versionTreeID().isBranch(); }
private void addVersion(Version<T> version) { if (!version.getUid().versionTreeID().isBranch()) { int trunkNo = Integer.parseInt(version.getUid().versionTreeID().trunkVersion()); if (trunkNo != trunkCounter + 1) { throw new IllegalArgumentException("invlalid trunk no in uid"); } else { trunkCounter++; latestTrunkUid = version.getUid(); } } timeVersionMap.put(version.getCommitAudit().getTimeCommitted(), version); idVersionMap.put(version.getUid(), version); }
private void addVersion(Version<T> version) { if (!version.getUid().versionTreeID().isBranch()) { int trunkNo = Integer.parseInt(version.getUid().versionTreeID().trunkVersion()); if (trunkNo != trunkCounter + 1) { throw new IllegalArgumentException("invlalid trunk no in uid"); } else { trunkCounter++; latestTrunkUid = version.getUid(); } } timeVersionMap.put(version.getCommitAudit().getTimeCommitted(), version); idVersionMap.put(version.getUid(), version); }
throw new IllegalArgumentException("null contribution"); if (uid.versionTreeID().isFirst() == (precedingVersionID != null)) { throw new IllegalArgumentException("breach of precedingVersionUid validity");
throw new IllegalArgumentException("null contribution"); if (uid.versionTreeID().isFirst() == (precedingVersionID != null)) { throw new IllegalArgumentException("breach of precedingVersionUid validity");