@Test public void testUpdateTimes() throws Exception { SRTInfo srtInfo = new SRTInfo(); srtInfo.add(new SRT(1, SRTTimeFormat.parse("00:00:24,600"), SRTTimeFormat.parse("00:00:26,600"), "Foo", "Bar")); srtInfo.add(new SRT(2, SRTTimeFormat.parse("00:11:24,600"), SRTTimeFormat.parse("00:12:26,600"), "Bye", "World")); SRTEditor.updateTimes(srtInfo, SRTTimeFormat.Type.MINUTE, -2); SRT srt = srtInfo.get(1); assertEquals(1L, srt.number); assertEquals("23:58:24,600", SRTTimeFormat.format(srt.startTime)); assertEquals("23:58:26,600", SRTTimeFormat.format(srt.endTime)); assertEquals("Foo", srt.text.get(0)); assertEquals("Bar", srt.text.get(1)); srt = srtInfo.get(2); assertEquals(2L, srt.number); assertEquals("00:09:24,600", SRTTimeFormat.format(srt.startTime)); assertEquals("00:10:26,600", SRTTimeFormat.format(srt.endTime)); assertEquals("Bye", srt.text.get(0)); assertEquals("World", srt.text.get(1)); }
public static void updateTimes(SRTInfo info, SRTTimeFormat.Type type, int value) { for (int i = 1; i <= info.size(); i++) { updateTime(info, info.get(i).number, type, value); } }
SRTEditor { public static void updateTimes(SRTInfo info, SRTTimeFormat.Type type, int value) { for (int i = 1; i <= info.size(); i++) { updateTime(info, info.get(i).number, type, value); } } }
SRTEditor { public static void updateTimes(SRTInfo info, SRTTimeFormat.Type type, int value) { for (int i = 1; i <= info.size(); i++) { updateTime(info, info.get(i).number, type, value); } } private  SRTEditor(); }
SRTEditor { public static void updateTimes(SRTInfo info, SRTTimeFormat.Type type, int value) { for (int i = 1; i <= info.size(); i++) { updateTime(info, info.get(i).number, type, value); } } private  SRTEditor(); static void updateTime(SRTInfo info, int subtitleNumber,
        SRTTimeFormat.Type type, int value); static void updateTimes(SRTInfo info, SRTTimeFormat.Type type, int value); static void updateText(SRTInfo info, int subtitleNumber, int width); static void updateTexts(SRTInfo info, int width); static void appendSubtitle(SRTInfo info, String startTime,
        String endTime, List<String> text); static void prependSubtitle(SRTInfo info, String startTime,
        String endTime, List<String> text); static void insertSubtitle(SRTInfo info, int subtitleNumber,
        String startTime, String endTime, List<String> text); static void insertSubtitle(SRTInfo info, SRT newSRT); static void removeSubtitle(SRTInfo info, int subtitleNumber); static void updateSubtitle(SRTInfo info, SRT srt); }
SRTEditor { public static void updateTimes(SRTInfo info, SRTTimeFormat.Type type, int value) { for (int i = 1; i <= info.size(); i++) { updateTime(info, info.get(i).number, type, value); } } private  SRTEditor(); static void updateTime(SRTInfo info, int subtitleNumber,
        SRTTimeFormat.Type type, int value); static void updateTimes(SRTInfo info, SRTTimeFormat.Type type, int value); static void updateText(SRTInfo info, int subtitleNumber, int width); static void updateTexts(SRTInfo info, int width); static void appendSubtitle(SRTInfo info, String startTime,
        String endTime, List<String> text); static void prependSubtitle(SRTInfo info, String startTime,
        String endTime, List<String> text); static void insertSubtitle(SRTInfo info, int subtitleNumber,
        String startTime, String endTime, List<String> text); static void insertSubtitle(SRTInfo info, SRT newSRT); static void removeSubtitle(SRTInfo info, int subtitleNumber); static void updateSubtitle(SRTInfo info, SRT srt);  }