@Override public View viewReverse() { return new TrimmedView(mSource.viewReverse(), mPrefix, mTrim); }
@Override public View viewReverse() { return apply(mSource.viewReverse()); }
@Override public View viewReverse() { return new KeyOnlyView(mSource.viewReverse()); }
@Override public View viewReverse() { return apply(mSource.viewReverse()); }
@Override public View viewReverse() { return new TrimmedView(mSource.viewReverse(), mPrefix, mTrim); }
@Override public View viewReverse() { return apply(mSource.viewReverse()); }
@Override public View viewReverse() { return new TrimmedView(mSource.viewReverse(), mPrefix, mTrim); }
/** * Returns a sub-view, backed by this one, whose keys are greater than or * equal to the given key. Ownership of the key instance is transferred, * and so it must not be modified after calling this method. * * <p>The returned view will throw a {@link ViewConstraintException} on an attempt to * insert a key outside its range. * * @throws UnsupportedOperationException if view is unordered * @throws NullPointerException if key is null */ public default View viewGe(byte[] key) { Ordering ordering = getOrdering(); if (ordering == Ordering.ASCENDING) { return BoundedView.viewGe(this, key); } else if (ordering == Ordering.DESCENDING) { return BoundedView.viewGe(viewReverse(), key).viewReverse(); } else { throw new UnsupportedOperationException("Unsupported ordering: " + ordering); } }
/** * Returns a sub-view, backed by this one, whose keys are less than or * equal to the given key. Ownership of the key instance is transferred, * and so it must not be modified after calling this method. * * <p>The returned view will throw a {@link ViewConstraintException} on an attempt to * insert a key outside its range. * * @throws UnsupportedOperationException if view is unordered * @throws NullPointerException if key is null */ public default View viewLe(byte[] key) { Ordering ordering = getOrdering(); if (ordering == Ordering.ASCENDING) { return BoundedView.viewLe(this, key); } else if (ordering == Ordering.DESCENDING) { return BoundedView.viewLe(viewReverse(), key).viewReverse(); } else { throw new UnsupportedOperationException("Unsupported ordering: " + ordering); } }
/** * Returns a sub-view, backed by this one, whose keys are greater than the * given key. Ownership of the key instance is transferred, and so it must * not be modified after calling this method. * * <p>The returned view will throw a {@link ViewConstraintException} on an attempt to * insert a key outside its range. * * @throws UnsupportedOperationException if view is unordered * @throws NullPointerException if key is null */ public default View viewGt(byte[] key) { Ordering ordering = getOrdering(); if (ordering == Ordering.ASCENDING) { return BoundedView.viewGt(this, key); } else if (ordering == Ordering.DESCENDING) { return BoundedView.viewGt(viewReverse(), key).viewReverse(); } else { throw new UnsupportedOperationException("Unsupported ordering: " + ordering); } }
/** * Returns a sub-view, backed by this one, whose keys are less than or * equal to the given key. Ownership of the key instance is transferred, * and so it must not be modified after calling this method. * * <p>The returned view will throw a {@link ViewConstraintException} on an attempt to * insert a key outside its range. * * @throws UnsupportedOperationException if view is unordered * @throws NullPointerException if key is null */ public default View viewLe(byte[] key) { Ordering ordering = getOrdering(); if (ordering == Ordering.ASCENDING) { return BoundedView.viewLe(this, key); } else if (ordering == Ordering.DESCENDING) { return BoundedView.viewLe(viewReverse(), key).viewReverse(); } else { throw new UnsupportedOperationException("Unsupported ordering: " + ordering); } }
/** * Returns a sub-view, backed by this one, whose keys are greater than the * given key. Ownership of the key instance is transferred, and so it must * not be modified after calling this method. * * <p>The returned view will throw a {@link ViewConstraintException} on an attempt to * insert a key outside its range. * * @throws UnsupportedOperationException if view is unordered * @throws NullPointerException if key is null */ public default View viewGt(byte[] key) { Ordering ordering = getOrdering(); if (ordering == Ordering.ASCENDING) { return BoundedView.viewGt(this, key); } else if (ordering == Ordering.DESCENDING) { return BoundedView.viewGt(viewReverse(), key).viewReverse(); } else { throw new UnsupportedOperationException("Unsupported ordering: " + ordering); } }
/** * Returns a sub-view, backed by this one, whose keys are greater than or * equal to the given key. Ownership of the key instance is transferred, * and so it must not be modified after calling this method. * * <p>The returned view will throw a {@link ViewConstraintException} on an attempt to * insert a key outside its range. * * @throws UnsupportedOperationException if view is unordered * @throws NullPointerException if key is null */ public default View viewGe(byte[] key) { Ordering ordering = getOrdering(); if (ordering == Ordering.ASCENDING) { return BoundedView.viewGe(this, key); } else if (ordering == Ordering.DESCENDING) { return BoundedView.viewGe(viewReverse(), key).viewReverse(); } else { throw new UnsupportedOperationException("Unsupported ordering: " + ordering); } }
/** * Returns a sub-view, backed by this one, whose keys are greater than the * given key. Ownership of the key instance is transferred, and so it must * not be modified after calling this method. * * <p>The returned view will throw a {@link ViewConstraintException} on an attempt to * insert a key outside its range. * * @throws UnsupportedOperationException if view is unordered * @throws NullPointerException if key is null */ public default View viewGt(byte[] key) { Ordering ordering = getOrdering(); if (ordering == Ordering.ASCENDING) { return BoundedView.viewGt(this, key); } else if (ordering == Ordering.DESCENDING) { return BoundedView.viewGt(viewReverse(), key).viewReverse(); } else { throw new UnsupportedOperationException("Unsupported ordering: " + ordering); } }
/** * Returns a sub-view, backed by this one, whose keys are less than or * equal to the given key. Ownership of the key instance is transferred, * and so it must not be modified after calling this method. * * <p>The returned view will throw a {@link ViewConstraintException} on an attempt to * insert a key outside its range. * * @throws UnsupportedOperationException if view is unordered * @throws NullPointerException if key is null */ public default View viewLe(byte[] key) { Ordering ordering = getOrdering(); if (ordering == Ordering.ASCENDING) { return BoundedView.viewLe(this, key); } else if (ordering == Ordering.DESCENDING) { return BoundedView.viewLe(viewReverse(), key).viewReverse(); } else { throw new UnsupportedOperationException("Unsupported ordering: " + ordering); } }
/** * Returns a sub-view, backed by this one, whose keys are less than the * given key. Ownership of the key instance is transferred, and so it must * not be modified after calling this method. * * <p>The returned view will throw a {@link ViewConstraintException} on an attempt to * insert a key outside its range. * * @throws UnsupportedOperationException if view is unordered * @throws NullPointerException if key is null */ public default View viewLt(byte[] key) { Ordering ordering = getOrdering(); if (ordering == Ordering.ASCENDING) { return BoundedView.viewLt(this, key); } else if (ordering == Ordering.DESCENDING) { return BoundedView.viewLt(viewReverse(), key).viewReverse(); } else { throw new UnsupportedOperationException("Unsupported ordering: " + ordering); } }
/** * Returns a sub-view, backed by this one, whose keys are greater than or * equal to the given key. Ownership of the key instance is transferred, * and so it must not be modified after calling this method. * * <p>The returned view will throw a {@link ViewConstraintException} on an attempt to * insert a key outside its range. * * @throws UnsupportedOperationException if view is unordered * @throws NullPointerException if key is null */ public default View viewGe(byte[] key) { Ordering ordering = getOrdering(); if (ordering == Ordering.ASCENDING) { return BoundedView.viewGe(this, key); } else if (ordering == Ordering.DESCENDING) { return BoundedView.viewGe(viewReverse(), key).viewReverse(); } else { throw new UnsupportedOperationException("Unsupported ordering: " + ordering); } }
/** * Returns a sub-view, backed by this one, whose keys start with the given prefix. * Ownership of the prefix instance is transferred, and so it must not be modified after * calling this method. * * <p>The returned view will throw a {@link ViewConstraintException} on an attempt to * insert a key outside its range. * * @param trim amount of prefix length to trim from all keys in the view * @throws UnsupportedOperationException if view is unordered * @throws NullPointerException if prefix is null * @throws IllegalArgumentException if trim is longer than prefix */ public default View viewPrefix(byte[] prefix, int trim) { Ordering ordering = getOrdering(); if (ordering == Ordering.ASCENDING) { return BoundedView.viewPrefix(this, prefix, trim); } else if (ordering == Ordering.DESCENDING) { return BoundedView.viewPrefix(viewReverse(), prefix, trim).viewReverse(); } else { throw new UnsupportedOperationException("Unsupported ordering: " + ordering); } }
/** * Returns a sub-view, backed by this one, whose keys are less than the * given key. Ownership of the key instance is transferred, and so it must * not be modified after calling this method. * * <p>The returned view will throw a {@link ViewConstraintException} on an attempt to * insert a key outside its range. * * @throws UnsupportedOperationException if view is unordered * @throws NullPointerException if key is null */ public default View viewLt(byte[] key) { Ordering ordering = getOrdering(); if (ordering == Ordering.ASCENDING) { return BoundedView.viewLt(this, key); } else if (ordering == Ordering.DESCENDING) { return BoundedView.viewLt(viewReverse(), key).viewReverse(); } else { throw new UnsupportedOperationException("Unsupported ordering: " + ordering); } }
/** * Returns a sub-view, backed by this one, whose keys start with the given prefix. * Ownership of the prefix instance is transferred, and so it must not be modified after * calling this method. * * <p>The returned view will throw a {@link ViewConstraintException} on an attempt to * insert a key outside its range. * * @param trim amount of prefix length to trim from all keys in the view * @throws UnsupportedOperationException if view is unordered * @throws NullPointerException if prefix is null * @throws IllegalArgumentException if trim is longer than prefix */ public default View viewPrefix(byte[] prefix, int trim) { Ordering ordering = getOrdering(); if (ordering == Ordering.ASCENDING) { return BoundedView.viewPrefix(this, prefix, trim); } else if (ordering == Ordering.DESCENDING) { return BoundedView.viewPrefix(viewReverse(), prefix, trim).viewReverse(); } else { throw new UnsupportedOperationException("Unsupported ordering: " + ordering); } }