ostore.update
Class PredicateCompareBytes

java.lang.Object
  |
  +--ostore.update.Predicate
        |
        +--ostore.update.PredicateCompareBytes
All Implemented Interfaces:
QuickSerializable

public class PredicateCompareBytes
extends Predicate

The PredicateCompareBytes predicate evaluates to true if the a Selection of bytes in the object matches the given bytes in the predicate.

TODO: Allow creator to specify version?

Version:
$Id: PredicateCompareBytes.java,v 1.6 2002/12/02 19:33:45 geels Exp $
Author:
Jeff Pang

Field Summary
static boolean DEBUG
           
 
Constructor Summary
PredicateCompareBytes(InputBuffer buffer)
           
PredicateCompareBytes(SecureHash aguid, Selection sel, byte[][] compare)
          Construct a PredicateCompareBytes predicate.
 
Method Summary
 byte[][] getCompare()
          The bytes we are comparing to
 Selection getSelection()
          The selection we are comparing against.
 Set getTargets()
           
 void serialize(OutputBuffer buffer)
          Add the object to the buffer.
 String toString()
          Return a representation of this predicate as a string.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

DEBUG

public static final boolean DEBUG
See Also:
Constant Field Values
Constructor Detail

PredicateCompareBytes

public PredicateCompareBytes(SecureHash aguid,
                             Selection sel,
                             byte[][] compare)
Construct a PredicateCompareBytes predicate.

Parameters:
aguid - the target object
sel - selection of bytes in the object to compare.
compare - the bytes to compare with. (one array per selection in a CompositeSelection; otherwise just one array for Range, All, and KeyedSelection)

PredicateCompareBytes

public PredicateCompareBytes(InputBuffer buffer)
                      throws QSException
Method Detail

serialize

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

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

getTargets

public Set getTargets()
Overrides:
getTargets in class Predicate

getSelection

public Selection getSelection()
The selection we are comparing against.


getCompare

public byte[][] getCompare()
The bytes we are comparing to


toString

public String toString()
Description copied from class: Predicate
Return a representation of this predicate as a string.

Specified by:
toString in class Predicate
Returns:
a string representation of this predicate