T
- buffer typepublic final class KeyRange<T>
extends java.lang.Object
Immutable once created (although the buffers themselves may not be).
Constructor and Description |
---|
KeyRange(KeyRangeType type,
T start,
T stop)
Construct a key range.
|
public KeyRange(KeyRangeType type, T start, T stop)
End user code may find it more expressive to use one of the static methods provided on this class.
type
- key typestart
- start key (required if applicable for the passed range type)stop
- stop key (required if applicable for the passed range type)public static <T> KeyRange<T> all()
KeyRangeType.FORWARD_ALL
range.T
- buffer typepublic static <T> KeyRange<T> allBackward()
KeyRangeType.BACKWARD_ALL
range.T
- buffer typepublic static <T> KeyRange<T> atLeast(T start)
KeyRangeType.FORWARD_AT_LEAST
range.T
- buffer typestart
- start key (required)public static <T> KeyRange<T> atLeastBackward(T start)
KeyRangeType.BACKWARD_AT_LEAST
range.T
- buffer typestart
- start key (required)public static <T> KeyRange<T> atMost(T stop)
KeyRangeType.FORWARD_AT_MOST
range.T
- buffer typestop
- stop key (required)public static <T> KeyRange<T> atMostBackward(T stop)
KeyRangeType.BACKWARD_AT_MOST
range.T
- buffer typestop
- stop key (required)public static <T> KeyRange<T> closed(T start, T stop)
KeyRangeType.FORWARD_CLOSED
range.T
- buffer typestart
- start key (required)stop
- stop key (required)public static <T> KeyRange<T> closedBackward(T start, T stop)
KeyRangeType.BACKWARD_CLOSED
range.T
- buffer typestart
- start key (required)stop
- stop key (required)public static <T> KeyRange<T> closedOpen(T start, T stop)
KeyRangeType.FORWARD_CLOSED_OPEN
range.T
- buffer typestart
- start key (required)stop
- stop key (required)public static <T> KeyRange<T> closedOpenBackward(T start, T stop)
KeyRangeType.BACKWARD_CLOSED_OPEN
range.T
- buffer typestart
- start key (required)stop
- stop key (required)public static <T> KeyRange<T> greaterThan(T start)
KeyRangeType.FORWARD_GREATER_THAN
range.T
- buffer typestart
- start key (required)public static <T> KeyRange<T> greaterThanBackward(T start)
KeyRangeType.BACKWARD_GREATER_THAN
range.T
- buffer typestart
- start key (required)public static <T> KeyRange<T> lessThan(T stop)
KeyRangeType.FORWARD_LESS_THAN
range.T
- buffer typestop
- stop key (required)public static <T> KeyRange<T> lessThanBackward(T stop)
KeyRangeType.BACKWARD_LESS_THAN
range.T
- buffer typestop
- stop key (required)public static <T> KeyRange<T> open(T start, T stop)
KeyRangeType.FORWARD_OPEN
range.T
- buffer typestart
- start key (required)stop
- stop key (required)public static <T> KeyRange<T> openBackward(T start, T stop)
KeyRangeType.BACKWARD_OPEN
range.T
- buffer typestart
- start key (required)stop
- stop key (required)public static <T> KeyRange<T> openClosed(T start, T stop)
KeyRangeType.FORWARD_OPEN_CLOSED
range.T
- buffer typestart
- start key (required)stop
- stop key (required)public static <T> KeyRange<T> openClosedBackward(T start, T stop)
KeyRangeType.BACKWARD_OPEN_CLOSED
range.T
- buffer typestart
- start key (required)stop
- stop key (required)public T getStart()
public T getStop()
public KeyRangeType getType()
Copyright © 2016–2018 The LmdbJava Open Source Project. All rights reserved.