@Test public void testSemicolon() { ChapterPattern cp = new ChapterPattern( "10;12;14" ); assertTrue( cp.contains( "10" ) ); assertTrue( cp.contains( "12" ) ); assertTrue( cp.contains( "14" ) ); assertFalse( cp.contains( "11" ) ); assertFalse( cp.contains( "13" ) ); }
public boolean contains( final String s ) { for ( Interval i : this.elements ) { if ( i.contains( s ) ) { return true; } } return this.fallback; }
ChapterPattern { public boolean contains( final String s ) { for ( Interval i : this.elements ) { if ( i.contains( s ) ) { return true; } } return this.fallback; } }
ChapterPattern { public boolean contains( final String s ) { for ( Interval i : this.elements ) { if ( i.contains( s ) ) { return true; } } return this.fallback; } ChapterPattern( final String pattern ); }
ChapterPattern { public boolean contains( final String s ) { for ( Interval i : this.elements ) { if ( i.contains( s ) ) { return true; } } return this.fallback; } ChapterPattern( final String pattern ); boolean contains( final String s ); @Override String toString(); }
ChapterPattern { public boolean contains( final String s ) { for ( Interval i : this.elements ) { if ( i.contains( s ) ) { return true; } } return this.fallback; } ChapterPattern( final String pattern ); boolean contains( final String s ); @Override String toString(); static final Pattern REGEX; }