ostore.read
Class HeadPredicate

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

public class HeadPredicate
extends Object
implements VersionPredicate

A VersionPredicate that requires a version that was still the most recent version at some point in a specified range.

The class name comes from the CVS term "head".

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

Constructor Summary
HeadPredicate(InputBuffer buffer)
          Constructs a HeadPredicate from its serialized form.
HeadPredicate(QSDate date)
          Constructs a new HeadPredicate that requires the version that was the most recent version at a specific date.
HeadPredicate(QSDate low, QSDate high)
          Constructs a new HeadPredicate that requires a version that was the most recent version at some date between low and high, inclusive.
 
Method Summary
 QSDate get_high()
          Returns the latest accaptable "head" date;
 QSDate get_low()
          Returns the earliest accaptable "head" date;
 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

HeadPredicate

public HeadPredicate(QSDate low,
                     QSDate high)
Constructs a new HeadPredicate that requires a version that was the most recent version at some date between low and high, inclusive. Set high=Clock.QS_NEVER for open-ended predicates.

Parameters:
low - The earliest acceptable "head" date.
high - The latest acceptable "head" date.
See Also:
Clock.QS_NEVER

HeadPredicate

public HeadPredicate(QSDate date)
Constructs a new HeadPredicate that requires the version that was the most recent version at a specific date.

Parameters:
date - The time at which the desired version was head.

HeadPredicate

public HeadPredicate(InputBuffer buffer)
              throws QSException
Constructs a HeadPredicate from its serialized form.

Method Detail

get_low

public QSDate get_low()
Returns the earliest accaptable "head" date;


get_high

public QSDate get_high()
Returns the latest accaptable "head" date;


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