@Test public void testCanParse() { String sdp1 = "t=123 456\n\r"; String sdp2 = "t=xyz 456\n\r"; String sdp3 = "t=123 xyz\n\r"; String sdp4 = "x=123 456\n\r"; boolean canParseSdp1 = parser.canParse(sdp1); boolean canParseSdp2 = parser.canParse(sdp2); boolean canParseSdp3 = parser.canParse(sdp3); boolean canParseSdp4 = parser.canParse(sdp4); Assert.assertTrue(canParseSdp1); Assert.assertFalse(canParseSdp2); Assert.assertFalse(canParseSdp3); Assert.assertFalse(canParseSdp4); }
@Override public boolean canParse(String sdp) { if(sdp == null || sdp.isEmpty()) { return false; } return PATTERN.matcher(sdp.trim()).matches(); }
TimingFieldParser implements SdpParser<TimingField> { @Override public boolean canParse(String sdp) { if(sdp == null || sdp.isEmpty()) { return false; } return PATTERN.matcher(sdp.trim()).matches(); } }
TimingFieldParser implements SdpParser<TimingField> { @Override public boolean canParse(String sdp) { if(sdp == null || sdp.isEmpty()) { return false; } return PATTERN.matcher(sdp.trim()).matches(); }  }
TimingFieldParser implements SdpParser<TimingField> { @Override public boolean canParse(String sdp) { if(sdp == null || sdp.isEmpty()) { return false; } return PATTERN.matcher(sdp.trim()).matches(); }  @Override boolean canParse(String sdp); @Override TimingField parse(String sdp); @Override void parse(TimingField field, String sdp); }
TimingFieldParser implements SdpParser<TimingField> { @Override public boolean canParse(String sdp) { if(sdp == null || sdp.isEmpty()) { return false; } return PATTERN.matcher(sdp.trim()).matches(); }  @Override boolean canParse(String sdp); @Override TimingField parse(String sdp); @Override void parse(TimingField field, String sdp);  }