/** * Given a collection of MSentryChange instances sorted by ID, return the string that prints in the collapsed format. * <p> * e.g: * <li> Input: [MSentryChange(1), MSentryChange(2), MSentryChange(3), MSentryChange(5), MSentryChange(7)] </li> * <li> Output: "[1-3, 5, 7]" </li> * </p> * @param changes List of {@link MSentryChange} * @return Collapsed string representation of the changeIDs */ public static String collapseChangeIDsToString(Collection<? extends MSentryChange> changes) { return SentryUtils.collapseNumsToString(getChangeIds(changes)); } }