@Test public void testToString() throws ReflectiveOperationException { ChapterPattern cp = new ChapterPattern( "10;" ); Field declaredField = cp.getClass().getDeclaredField( "elements" ); declaredField.setAccessible( true ); @SuppressWarnings( "unchecked" ) Collection<Interval> c = ( Collection<Interval> ) declaredField.get( cp ); assertEquals( c.toString(), cp.toString() ); }
@Override public String toString() { return String.valueOf( this.elements ); }
ChapterPattern { @Override public String toString() { return String.valueOf( this.elements ); } }
ChapterPattern { @Override public String toString() { return String.valueOf( this.elements ); } ChapterPattern( final String pattern ); }
ChapterPattern { @Override public String toString() { return String.valueOf( this.elements ); } ChapterPattern( final String pattern ); boolean contains( final String s ); @Override String toString(); }
ChapterPattern { @Override public String toString() { return String.valueOf( this.elements ); } ChapterPattern( final String pattern ); boolean contains( final String s ); @Override String toString(); static final Pattern REGEX; }