public Entry<String, Ref> peek() {if (packedIdx < packed.size() && looseIdx < loose.size()) {Ref p = packed.get(packedIdx);Ref l = loose.get(looseIdx);int cmp = RefComparator.compareTo(p, l);if (cmp < 0) {packedIdx++;return toEntry(p);}if (cmp == 0)packedIdx++;looseIdx++;return toEntry(resolveLoose(l));}if (looseIdx < loose.size())return toEntry(resolveLoose(loose.get(looseIdx++)));if (packedIdx < packed.size())return toEntry(packed.get(packedIdx++));return null;}
public virtual Ent Peek(){if (this.packedIdx < this._enclosing.packed.Size() && this.looseIdx < this._enclosing.loose.Size()){Ref p = this._enclosing.packed.Get(this.packedIdx);Ref l = this._enclosing.loose.Get(this.looseIdx);int cmp = RefComparator.CompareTo(p, l);if (cmp < 0){this.packedIdx++;return this.ToEntry(p);}if (cmp == 0){this.packedIdx++;}this.looseIdx++;return this.ToEntry(this.ResolveLoose(l));}if (this.looseIdx < this._enclosing.loose.Size()){return this.ToEntry(this.ResolveLoose(this._enclosing.loose.Get(this.looseIdx++)));}if (this.packedIdx < this._enclosing.packed.Size()){return this.ToEntry(this._enclosing.packed.Get(this.packedIdx++));}return null;}