org.cruxframework.crux.core.client.db
Interface KeyRangeFactory<K>

Type Parameters:
K - The type of the key used by KeyRanges produced by this factory .

public interface KeyRangeFactory<K>

A factory for KeyRange objects

Author:
Thiago da Rosa de Bustamante

Method Summary
 KeyRange<K> bound(K startKey, K endKey)
          Create a KeyRange including all keys between upper and lower bound keys
 KeyRange<K> bound(K startKey, K endKey, boolean startOpen, boolean endOpen)
          Create a KeyRange including all keys between upper and lower bound keys
 KeyRange<K> lowerBound(K key)
          Create a KeyRange including all keys greater than the given key
 KeyRange<K> lowerBound(K key, boolean open)
          Create a KeyRange including all keys greater than the given key
 KeyRange<K> only(K key)
          Create a KeyRange including only the given Key
 KeyRange<K> upperBound(K key)
          Create a KeyRange including all keys smaller than the given key
 KeyRange<K> upperBound(K key, boolean open)
          Create a KeyRange including all keys smaller than the given key
 

Method Detail

only

KeyRange<K> only(K key)
Create a KeyRange including only the given Key

Parameters:
key -
Returns:

lowerBound

KeyRange<K> lowerBound(K key,
                       boolean open)
Create a KeyRange including all keys greater than the given key

Parameters:
key -
open - if true, does not include the lower bound
Returns:

lowerBound

KeyRange<K> lowerBound(K key)
Create a KeyRange including all keys greater than the given key

Parameters:
key -
Returns:

upperBound

KeyRange<K> upperBound(K key,
                       boolean open)
Create a KeyRange including all keys smaller than the given key

Parameters:
key -
open - if true, does not include the upper bound
Returns:

upperBound

KeyRange<K> upperBound(K key)
Create a KeyRange including all keys smaller than the given key

Parameters:
key -
Returns:

bound

KeyRange<K> bound(K startKey,
                  K endKey,
                  boolean startOpen,
                  boolean endOpen)
Create a KeyRange including all keys between upper and lower bound keys

Parameters:
startKey -
endKey -
startOpen - if true, does not include the lower bound
endOpen - if true, does not include the upper bound
Returns:

bound

KeyRange<K> bound(K startKey,
                  K endKey)
Create a KeyRange including all keys between upper and lower bound keys

Parameters:
startKey -
endKey -
Returns:


Copyright © 2014. All rights reserved.