oracle.adfnmc.util
Class RSDateComparator
java.lang.Object
oracle.adfnmc.util.RSDateComparator
- All Implemented Interfaces:
- javax.microedition.rms.RecordComparator
public class RSDateComparator
- extends java.lang.Object
- implements javax.microedition.rms.RecordComparator
This class can be used to return RecordStore records sorted in increasing order
by a Long. This of course assumes that the first 8 bytes of each record constitute
a valid Long. One use of this is to sort records by date via System.currentTimeMillis();
hence the name of this class.
- Author:
- PARACHAN
Fields inherited from interface javax.microedition.rms.RecordComparator |
EQUIVALENT, FOLLOWS, PRECEDES |
Method Summary |
int |
compare(byte[] rec1,
byte[] rec2)
Read the timestamps out of each record and compare them to see
which one should come first. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CLASS_INSTANCE
public static final java.lang.Class CLASS_INSTANCE
RSDateComparator
public RSDateComparator()
compare
public int compare(byte[] rec1,
byte[] rec2)
- Read the timestamps out of each record and compare them to see
which one should come first.
- Specified by:
compare
in interface javax.microedition.rms.RecordComparator
Copyright © 2011, Oracle and/or its affiliates. All rights reserved.