@Test public void testContains() { IntRange range = new IntRange("1,3,4-6,8"); assertFalse(range.contains(0)); assertTrue(range.contains(1)); assertFalse(range.contains(2)); assertTrue(range.contains(3)); assertTrue(range.contains(4)); assertTrue(range.contains(5)); assertTrue(range.contains(6)); assertFalse(range.contains(7)); assertTrue(range.contains(8)); assertFalse(range.contains(9)); }
public boolean contains(final int element) { return sectionList.stream().filter(v -> v.contains(element)).findFirst().isPresent(); }
IntRange { public boolean contains(final int element) { return sectionList.stream().filter(v -> v.contains(element)).findFirst().isPresent(); } }
IntRange { public boolean contains(final int element) { return sectionList.stream().filter(v -> v.contains(element)).findFirst().isPresent(); } IntRange(String expression); }
IntRange { public boolean contains(final int element) { return sectionList.stream().filter(v -> v.contains(element)).findFirst().isPresent(); } IntRange(String expression); boolean contains(final int element); }
IntRange { public boolean contains(final int element) { return sectionList.stream().filter(v -> v.contains(element)).findFirst().isPresent(); } IntRange(String expression); boolean contains(final int element);  }