@Test public void testAppendSubtitle() { SRTInfo srtInfo = new SRTInfo(); SRTEditor.appendSubtitle(srtInfo, "00:00:24,600", "00:00:26,600", Arrays.asList("Foo")); SRTEditor.appendSubtitle(srtInfo, "00:11:24,600", "00:12:26,600", Arrays.asList("Bar")); SRT srt = srtInfo.get(1); assertEquals(1L, srt.number); assertEquals("00:00:24,600", SRTTimeFormat.format(srt.startTime)); assertEquals("00:00:26,600", SRTTimeFormat.format(srt.endTime)); assertEquals(1, srt.text.size()); assertEquals("Foo", srt.text.get(0)); srt = srtInfo.get(2); assertEquals(2L, srt.number); assertEquals("00:11:24,600", SRTTimeFormat.format(srt.startTime)); assertEquals("00:12:26,600", SRTTimeFormat.format(srt.endTime)); assertEquals(1, srt.text.size()); }
public static void appendSubtitle(SRTInfo info, String startTime, String endTime, List<String> text) { try { SRT newSRT = new SRT( info.size() + 1, SRTTimeFormat.parse(startTime), SRTTimeFormat.parse(endTime), text); info.add(newSRT); } catch (ParseException e) { throw new SRTEditorException(e); } }
SRTEditor { public static void appendSubtitle(SRTInfo info, String startTime, String endTime, List<String> text) { try { SRT newSRT = new SRT( info.size() + 1, SRTTimeFormat.parse(startTime), SRTTimeFormat.parse(endTime), text); info.add(newSRT); } catch (ParseException e) { throw new SRTEditorException(e); } } }
SRTEditor { public static void appendSubtitle(SRTInfo info, String startTime, String endTime, List<String> text) { try { SRT newSRT = new SRT( info.size() + 1, SRTTimeFormat.parse(startTime), SRTTimeFormat.parse(endTime), text); info.add(newSRT); } catch (ParseException e) { throw new SRTEditorException(e); } } private  SRTEditor(); }
SRTEditor { public static void appendSubtitle(SRTInfo info, String startTime, String endTime, List<String> text) { try { SRT newSRT = new SRT( info.size() + 1, SRTTimeFormat.parse(startTime), SRTTimeFormat.parse(endTime), text); info.add(newSRT); } catch (ParseException e) { throw new SRTEditorException(e); } } 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 appendSubtitle(SRTInfo info, String startTime, String endTime, List<String> text) { try { SRT newSRT = new SRT( info.size() + 1, SRTTimeFormat.parse(startTime), SRTTimeFormat.parse(endTime), text); info.add(newSRT); } catch (ParseException e) { throw new SRTEditorException(e); } } 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);  }