@Test public void lengthTest() { Assert.assertEquals(0, new Span(0, 0).length()); Assert.assertEquals(1, new Span(0, 1).length()); Assert.assertEquals(4, new Span(1, 5).length()); }
public int length() { return end - start; }
Span { public int length() { return end - start; } }
Span { public int length() { return end - start; } Span(int start, int end); }
Span { public int length() { return end - start; } Span(int start, int end); int length(); int middleValue(); Span copy(int offset); String getSubstring(String input); boolean inSpan(int i); }
Span { public int length() { return end - start; } Span(int start, int end); int length(); int middleValue(); Span copy(int offset); String getSubstring(String input); boolean inSpan(int i); final int start; final int end; }