@Test public void testOpenRangeStart() { WordRange range = new WordRange("-k"); Assert.assertTrue(range.apply("")); Assert.assertTrue(range.apply("0")); Assert.assertTrue(range.apply("a")); Assert.assertTrue(range.apply("k")); Assert.assertFalse(range.apply("l")); Assert.assertFalse(range.apply("~")); Assert.assertFalse(range.apply("\uffff")); }
@Override public boolean apply(String string) { String lower = string.toLowerCase(); Map.Entry<String, String> entry = ranges.floorEntry(lower); return entry != null && lower.compareTo(entry.getValue()) <= 0; }
WordRange implements Predicate<String> { @Override public boolean apply(String string) { String lower = string.toLowerCase(); Map.Entry<String, String> entry = ranges.floorEntry(lower); return entry != null && lower.compareTo(entry.getValue()) <= 0; } }
WordRange implements Predicate<String> { @Override public boolean apply(String string) { String lower = string.toLowerCase(); Map.Entry<String, String> entry = ranges.floorEntry(lower); return entry != null && lower.compareTo(entry.getValue()) <= 0; } WordRange(String rangeString); }
WordRange implements Predicate<String> { @Override public boolean apply(String string) { String lower = string.toLowerCase(); Map.Entry<String, String> entry = ranges.floorEntry(lower); return entry != null && lower.compareTo(entry.getValue()) <= 0; } WordRange(String rangeString); @Override boolean apply(String string); @Override @JsonValue String toString(); }
WordRange implements Predicate<String> { @Override public boolean apply(String string) { String lower = string.toLowerCase(); Map.Entry<String, String> entry = ranges.floorEntry(lower); return entry != null && lower.compareTo(entry.getValue()) <= 0; } WordRange(String rangeString); @Override boolean apply(String string); @Override @JsonValue String toString();  }