ostore.read
Class NumberPredicate

java.lang.Object
  |
  +--ostore.read.NumberPredicate
All Implemented Interfaces:
QuickSerializable, VersionPredicate

public class NumberPredicate
extends Object
implements VersionPredicate

A VersionPredicate that requires version whose sequence number lies in a specified range.

Version:
$Id: NumberPredicate.java,v 1.16 2002/07/29 18:48:53 geels Exp $
Author:
Dennis Geels

Constructor Summary
NumberPredicate(InputBuffer buffer)
          Constructs a NumberPredicate from its serialized form.
NumberPredicate(long number)
          Constructs a new NumberPredicate that requires a specific version.
NumberPredicate(long low, long high)
          Constructs a new NumberPredicate that requires a sequence number between low and high, inclusive.
 
Method Summary
 long get_high()
          Returns the highest accaptable sequence number;
 long get_low()
          Returns the lowest accaptable sequence number;
 void serialize(OutputBuffer buffer)
          Add the object to the buffer.
 String toString()
          Returns a human-readable representation of this predicate.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

NumberPredicate

public NumberPredicate(long low,
                       long high)
Constructs a new NumberPredicate that requires a sequence number between low and high, inclusive. Set low=0 or high=Long.MAX_VALUE for open-ended predicates.

Parameters:
low - The lowest acceptable sequence number.
high - The highest acceptable sequence number.

NumberPredicate

public NumberPredicate(long number)
Constructs a new NumberPredicate that requires a specific version.

Parameters:
number - The only acceptable sequence number.

NumberPredicate

public NumberPredicate(InputBuffer buffer)
Constructs a NumberPredicate from its serialized form.

Method Detail

get_low

public long get_low()
Returns the lowest accaptable sequence number;


get_high

public long get_high()
Returns the highest accaptable sequence number;


serialize

public void serialize(OutputBuffer buffer)
Description copied from interface: QuickSerializable
Add the object to the buffer.

Specified by:
serialize in interface QuickSerializable
Parameters:
buffer - the output buffer to add the object to

toString

public String toString()
Returns a human-readable representation of this predicate.

Overrides:
toString in class Object