/** * Creates a new {@link Guid} which is a unique, replicable representation of the pair (this, guids). Equivalent to * combine(this, guid1, guid2, ...) * @param guids an array of {@link Guid}. * @return a new {@link Guid}. * @throws IOException */ public Guid append(Guid... guids) throws IOException { if (guids == null || guids.length == 0) { return this; } return combine(ArrayUtils.add(guids, this)); }
private static String computeGuid(State state, CopyEntity file) throws IOException { Optional<Guid> stateGuid = CopySource.getWorkUnitGuid(state); if (stateGuid.isPresent()) { return Guid.combine(file.guid(), stateGuid.get()).toString(); } throw new IOException("State does not contain a guid."); } }