javax.microedition.rms
Interface RecordFilter


public interface RecordFilter

An interface defining a filter which examines a record to see if it matches (based on an application-defined criteria). The application implements the match() method to select records to be returned by the RecordEnumeration. Returns true if the candidate record is selected by the RecordFilter. This interface is used in the record store for searching or subsetting records. For example:

    RecordFilter f = new DateRecordFilter(); // class implements RecordFilter
    if (f.matches(recordStore.getRecord(theRecordID)) == true)
        DoSomethingUseful(theRecordID);
    


Method Summary
 boolean matches(byte[] candidate)
          Returns true if the candidate matches the implemented criterion.
 

Method Detail

matches

public boolean matches(byte[] candidate)
Returns true if the candidate matches the implemented criterion.
Parameters:
candidate - The record to consider. Within this method, the application must treat this parameter as read-only.
Returns:
true if the candidate matches the implemented criterion.
Since:
JDE 3.6


Copyright 1999-2002 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Copyright 1993-2000 Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, California, 94303, U.S.A. All Rights Reserved.
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.