@Test public void lowExcludedHighIncluded() { ServerVersionRange range = range(false, true); assertFalse(range.contains(ServerVersion.VERSION_0_0_0)); assertFalse(range.contains(ServerVersion.VERSION_1_0_0)); assertTrue(range.contains(ServerVersion.VERSION_1_5_0)); assertTrue(range.contains(ServerVersion.VERSION_2_0_0)); assertFalse(range.contains(ServerVersion.VERSION_2_1_0)); assertFalse(range.contains(ServerVersion.VERSION_3_0_0)); }
boolean contains(ServerVersion version) { if (version.equals(low)) { return lowIncluded; } else if (version.equals(high)) { return highIncluded; } else { return low.lessThan(version) && high.greaterThan(version); } }
ServerVersionRange { boolean contains(ServerVersion version) { if (version.equals(low)) { return lowIncluded; } else if (version.equals(high)) { return highIncluded; } else { return low.lessThan(version) && high.greaterThan(version); } } }
ServerVersionRange { boolean contains(ServerVersion version) { if (version.equals(low)) { return lowIncluded; } else if (version.equals(high)) { return highIncluded; } else { return low.lessThan(version) && high.greaterThan(version); } } ServerVersionRange(ServerVersion low, boolean lowIncluded, ServerVersion high, boolean highIncluded); }
ServerVersionRange { boolean contains(ServerVersion version) { if (version.equals(low)) { return lowIncluded; } else if (version.equals(high)) { return highIncluded; } else { return low.lessThan(version) && high.greaterThan(version); } } ServerVersionRange(ServerVersion low, boolean lowIncluded, ServerVersion high, boolean highIncluded);  }
ServerVersionRange { boolean contains(ServerVersion version) { if (version.equals(low)) { return lowIncluded; } else if (version.equals(high)) { return highIncluded; } else { return low.lessThan(version) && high.greaterThan(version); } } ServerVersionRange(ServerVersion low, boolean lowIncluded, ServerVersion high, boolean highIncluded);   }