private boolean tooHigh(Object key) { if (hi != null) { int c = m.compare(key, hi); if (c > 0 || (c == 0 && !hiInclusive)) return true; } return false; }
private boolean tooLow(Object key) { if (lo != null) { int c = m.compare(key, lo); if (c < 0 || (c == 0 && !loInclusive)) return true; } return false; }
private boolean tooHigh(Object key) { if (hi != null) { int c = m.compare(key, hi); if (c > 0 || (c == 0 && !hiInclusive)) return true; } return false; }
private boolean tooLow(Object key) { if (lo != null) { int c = m.compare(key, lo); if (c < 0 || (c == 0 && !loInclusive)) return true; } return false; }
private boolean tooLow(Object key) { if (lo != null) { int c = m.compare(key, lo); if (c < 0 || (c == 0 && !loInclusive)) return true; } return false; }
private boolean tooHigh(Object key) { if (hi != null) { int c = m.compare(key, hi); if (c > 0 || (c == 0 && !hiInclusive)) return true; } return false; }
/** * Returns true if node key is less than upper bound of range */ private boolean isBeforeEnd(ConcurrentSkipListMap.Node n) { if (n == null) return false; if (hi == null) return true; Object k = n.key; if (k == null) // pass by markers and headers return true; int c = m.compare(k, hi); if (c > 0 || (c == 0 && !hiInclusive)) return false; return true; }
/** * Returns true if node key is less than upper bound of range */ private boolean isBeforeEnd(ConcurrentSkipListMap.Node n) { if (n == null) return false; if (hi == null) return true; Object k = n.key; if (k == null) // pass by markers and headers return true; int c = m.compare(k, hi); if (c > 0 || (c == 0 && !hiInclusive)) return false; return true; }
/** * Returns true if given key greater than or equal to least and * strictly less than fence, bypassing either test if least or * fence are null. Needed mainly in submap operations. */ boolean inHalfOpenRange(Object key, Object least, Object fence) { if (key == null) throw new NullPointerException(); return ((least == null || compare(key, least) >= 0) && (fence == null || compare(key, fence) < 0)); }
/** * Returns true if node key is less than upper bound of range */ private boolean isBeforeEnd(ConcurrentSkipListMap.Node n) { if (n == null) return false; if (hi == null) return true; Object k = n.key; if (k == null) // pass by markers and headers return true; int c = m.compare(k, hi); if (c > 0 || (c == 0 && !hiInclusive)) return false; return true; }
/** * Returns true if given key greater than or equal to least and * strictly less than fence, bypassing either test if least or * fence are null. Needed mainly in submap operations. */ boolean inHalfOpenRange(Object key, Object least, Object fence) { if (key == null) throw new NullPointerException(); return ((least == null || compare(key, least) >= 0) && (fence == null || compare(key, fence) < 0)); }
/** * Returns true if given key greater than or equal to least and less * or equal to fence. Needed mainly in submap operations. */ boolean inOpenRange(Object key, Object least, Object fence) { if (key == null) throw new NullPointerException(); return ((least == null || compare(key, least) >= 0) && (fence == null || compare(key, fence) <= 0)); }
/** * Returns true if given key greater than or equal to least and less * or equal to fence. Needed mainly in submap operations. */ boolean inOpenRange(Object key, Object least, Object fence) { if (key == null) throw new NullPointerException(); return ((least == null || compare(key, least) >= 0) && (fence == null || compare(key, fence) <= 0)); }
/** * Returns true if given key greater than or equal to least and * strictly less than fence, bypassing either test if least or * fence are null. Needed mainly in submap operations. */ boolean inHalfOpenRange(Object key, Object least, Object fence) { if (key == null) throw new NullPointerException(); return ((least == null || compare(key, least) >= 0) && (fence == null || compare(key, fence) < 0)); }
/** * Returns true if given key greater than or equal to least and less * or equal to fence. Needed mainly in submap operations. */ boolean inOpenRange(Object key, Object least, Object fence) { if (key == null) throw new NullPointerException(); return ((least == null || compare(key, least) >= 0) && (fence == null || compare(key, fence) <= 0)); }
/** * Creates a new submap, initializing all fields */ SubMap(ConcurrentSkipListMap map, Object fromKey, boolean fromInclusive, Object toKey, boolean toInclusive, boolean isDescending) { if (fromKey != null && toKey != null && map.compare(fromKey, toKey) > 0) throw new IllegalArgumentException("inconsistent range"); this.m = map; this.lo = fromKey; this.hi = toKey; this.loInclusive = fromInclusive; this.hiInclusive = toInclusive; this.isDescending = isDescending; }
/** * Creates a new submap, initializing all fields */ SubMap(ConcurrentSkipListMap map, Object fromKey, boolean fromInclusive, Object toKey, boolean toInclusive, boolean isDescending) { if (fromKey != null && toKey != null && map.compare(fromKey, toKey) > 0) throw new IllegalArgumentException("inconsistent range"); this.m = map; this.lo = fromKey; this.hi = toKey; this.loInclusive = fromInclusive; this.hiInclusive = toInclusive; this.isDescending = isDescending; }
/** * Creates a new submap, initializing all fields */ SubMap(ConcurrentSkipListMap map, Object fromKey, boolean fromInclusive, Object toKey, boolean toInclusive, boolean isDescending) { if (fromKey != null && toKey != null && map.compare(fromKey, toKey) > 0) throw new IllegalArgumentException("inconsistent range"); this.m = map; this.lo = fromKey; this.hi = toKey; this.loInclusive = fromInclusive; this.hiInclusive = toInclusive; this.isDescending = isDescending; }