home *** CD-ROM | disk | FTP | other *** search
- package java.util;
-
- import java.io.Serializable;
-
- abstract class TreeMap$NavigableSubMap<K, V> extends AbstractMap<K, V> implements NavigableMap<K, V>, Serializable {
- // $FF: renamed from: m java.util.TreeMap
- final TreeMap<K, V> field_0;
- // $FF: renamed from: lo java.lang.Object
- final K field_1;
- // $FF: renamed from: hi java.lang.Object
- final K field_2;
- final boolean fromStart;
- final boolean toEnd;
- final boolean loInclusive;
- final boolean hiInclusive;
- transient NavigableMap<K, V> descendingMapView = null;
- transient TreeMap$NavigableSubMap<K, V>.EntrySetView entrySetView = null;
- transient TreeMap.KeySet<K> navigableKeySetView = null;
-
- TreeMap$NavigableSubMap(TreeMap<K, V> var1, boolean var2, K var3, boolean var4, boolean var5, K var6, boolean var7) {
- if (!var2 && !var5) {
- if (var1.compare(var3, var6) > 0) {
- throw new IllegalArgumentException("fromKey > toKey");
- }
- } else {
- if (!var2) {
- var1.compare(var3, var3);
- }
-
- if (!var5) {
- var1.compare(var6, var6);
- }
- }
-
- this.field_0 = var1;
- this.fromStart = var2;
- this.field_1 = var3;
- this.loInclusive = var4;
- this.toEnd = var5;
- this.field_2 = var6;
- this.hiInclusive = var7;
- }
-
- final boolean tooLow(Object var1) {
- if (!this.fromStart) {
- int var2 = this.field_0.compare(var1, this.field_1);
- if (var2 < 0 || var2 == 0 && !this.loInclusive) {
- return true;
- }
- }
-
- return false;
- }
-
- final boolean tooHigh(Object var1) {
- if (!this.toEnd) {
- int var2 = this.field_0.compare(var1, this.field_2);
- if (var2 > 0 || var2 == 0 && !this.hiInclusive) {
- return true;
- }
- }
-
- return false;
- }
-
- final boolean inRange(Object var1) {
- return !this.tooLow(var1) && !this.tooHigh(var1);
- }
-
- final boolean inClosedRange(Object var1) {
- return (this.fromStart || this.field_0.compare(var1, this.field_1) >= 0) && (this.toEnd || this.field_0.compare(this.field_2, var1) >= 0);
- }
-
- final boolean inRange(Object var1, boolean var2) {
- return var2 ? this.inRange(var1) : this.inClosedRange(var1);
- }
-
- final TreeMap.Entry<K, V> absLowest() {
- TreeMap.Entry var1 = this.fromStart ? this.field_0.getFirstEntry() : (this.loInclusive ? this.field_0.getCeilingEntry(this.field_1) : this.field_0.getHigherEntry(this.field_1));
- return var1 != null && !this.tooHigh(var1.key) ? var1 : null;
- }
-
- final TreeMap.Entry<K, V> absHighest() {
- TreeMap.Entry var1 = this.toEnd ? this.field_0.getLastEntry() : (this.hiInclusive ? this.field_0.getFloorEntry(this.field_2) : this.field_0.getLowerEntry(this.field_2));
- return var1 != null && !this.tooLow(var1.key) ? var1 : null;
- }
-
- final TreeMap.Entry<K, V> absCeiling(K var1) {
- if (this.tooLow(var1)) {
- return this.absLowest();
- } else {
- TreeMap.Entry var2 = this.field_0.getCeilingEntry(var1);
- return var2 != null && !this.tooHigh(var2.key) ? var2 : null;
- }
- }
-
- final TreeMap.Entry<K, V> absHigher(K var1) {
- if (this.tooLow(var1)) {
- return this.absLowest();
- } else {
- TreeMap.Entry var2 = this.field_0.getHigherEntry(var1);
- return var2 != null && !this.tooHigh(var2.key) ? var2 : null;
- }
- }
-
- final TreeMap.Entry<K, V> absFloor(K var1) {
- if (this.tooHigh(var1)) {
- return this.absHighest();
- } else {
- TreeMap.Entry var2 = this.field_0.getFloorEntry(var1);
- return var2 != null && !this.tooLow(var2.key) ? var2 : null;
- }
- }
-
- final TreeMap.Entry<K, V> absLower(K var1) {
- if (this.tooHigh(var1)) {
- return this.absHighest();
- } else {
- TreeMap.Entry var2 = this.field_0.getLowerEntry(var1);
- return var2 != null && !this.tooLow(var2.key) ? var2 : null;
- }
- }
-
- final TreeMap.Entry<K, V> absHighFence() {
- return this.toEnd ? null : (this.hiInclusive ? this.field_0.getHigherEntry(this.field_2) : this.field_0.getCeilingEntry(this.field_2));
- }
-
- final TreeMap.Entry<K, V> absLowFence() {
- return this.fromStart ? null : (this.loInclusive ? this.field_0.getLowerEntry(this.field_1) : this.field_0.getFloorEntry(this.field_1));
- }
-
- abstract TreeMap.Entry<K, V> subLowest();
-
- abstract TreeMap.Entry<K, V> subHighest();
-
- abstract TreeMap.Entry<K, V> subCeiling(K var1);
-
- abstract TreeMap.Entry<K, V> subHigher(K var1);
-
- abstract TreeMap.Entry<K, V> subFloor(K var1);
-
- abstract TreeMap.Entry<K, V> subLower(K var1);
-
- abstract Iterator<K> keyIterator();
-
- abstract Iterator<K> descendingKeyIterator();
-
- public boolean isEmpty() {
- return this.fromStart && this.toEnd ? this.field_0.isEmpty() : this.entrySet().isEmpty();
- }
-
- public int size() {
- return this.fromStart && this.toEnd ? this.field_0.size() : this.entrySet().size();
- }
-
- public final boolean containsKey(Object var1) {
- return this.inRange(var1) && this.field_0.containsKey(var1);
- }
-
- public final V put(K var1, V var2) {
- if (!this.inRange(var1)) {
- throw new IllegalArgumentException("key out of range");
- } else {
- return (V)this.field_0.put(var1, var2);
- }
- }
-
- public final V get(Object var1) {
- return (V)(!this.inRange(var1) ? null : this.field_0.get(var1));
- }
-
- public final V remove(Object var1) {
- return (V)(!this.inRange(var1) ? null : this.field_0.remove(var1));
- }
-
- public final Map.Entry<K, V> ceilingEntry(K var1) {
- return TreeMap.exportEntry(this.subCeiling(var1));
- }
-
- public final K ceilingKey(K var1) {
- return (K)TreeMap.keyOrNull(this.subCeiling(var1));
- }
-
- public final Map.Entry<K, V> higherEntry(K var1) {
- return TreeMap.exportEntry(this.subHigher(var1));
- }
-
- public final K higherKey(K var1) {
- return (K)TreeMap.keyOrNull(this.subHigher(var1));
- }
-
- public final Map.Entry<K, V> floorEntry(K var1) {
- return TreeMap.exportEntry(this.subFloor(var1));
- }
-
- public final K floorKey(K var1) {
- return (K)TreeMap.keyOrNull(this.subFloor(var1));
- }
-
- public final Map.Entry<K, V> lowerEntry(K var1) {
- return TreeMap.exportEntry(this.subLower(var1));
- }
-
- public final K lowerKey(K var1) {
- return (K)TreeMap.keyOrNull(this.subLower(var1));
- }
-
- public final K firstKey() {
- return (K)TreeMap.key(this.subLowest());
- }
-
- public final K lastKey() {
- return (K)TreeMap.key(this.subHighest());
- }
-
- public final Map.Entry<K, V> firstEntry() {
- return TreeMap.exportEntry(this.subLowest());
- }
-
- public final Map.Entry<K, V> lastEntry() {
- return TreeMap.exportEntry(this.subHighest());
- }
-
- public final Map.Entry<K, V> pollFirstEntry() {
- TreeMap.Entry var1 = this.subLowest();
- Map.Entry var2 = TreeMap.exportEntry(var1);
- if (var1 != null) {
- TreeMap.access$000(this.field_0, var1);
- }
-
- return var2;
- }
-
- public final Map.Entry<K, V> pollLastEntry() {
- TreeMap.Entry var1 = this.subHighest();
- Map.Entry var2 = TreeMap.exportEntry(var1);
- if (var1 != null) {
- TreeMap.access$000(this.field_0, var1);
- }
-
- return var2;
- }
-
- public final NavigableSet<K> navigableKeySet() {
- TreeMap.KeySet var1 = this.navigableKeySetView;
- return var1 != null ? var1 : (this.navigableKeySetView = new TreeMap.KeySet(this));
- }
-
- public final Set<K> keySet() {
- return this.navigableKeySet();
- }
-
- public NavigableSet<K> descendingKeySet() {
- return this.descendingMap().navigableKeySet();
- }
-
- public final SortedMap<K, V> subMap(K var1, K var2) {
- return this.subMap(var1, true, var2, false);
- }
-
- public final SortedMap<K, V> headMap(K var1) {
- return this.headMap(var1, false);
- }
-
- public final SortedMap<K, V> tailMap(K var1) {
- return this.tailMap(var1, true);
- }
- }
-