uwcse.location.core
Class Measurement.TimestampComparator

java.lang.Object
  |
  +--uwcse.location.core.Measurement.TimestampComparator
All Implemented Interfaces:
Comparator
Enclosing class:
Measurement

public static class Measurement.TimestampComparator
extends Object
implements Comparator

This class provides a comparator ordered by the timestamps of measurements, for example, in order to sort a list of Measurment objects by their timestamps. Note: This comparator imposes orderings that are inconsistent with equals, that is Measurement.TimestampComparator.compare(meas1, meas2) is not equivalent to meas1.equals(meas2).


Constructor Summary
Measurement.TimestampComparator()
           
 
Method Summary
 int compare(Object o1, Object o2)
          Compare two Measurements based on their timestamps.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.Comparator
equals
 

Constructor Detail

Measurement.TimestampComparator

public Measurement.TimestampComparator()
Method Detail

compare

public int compare(Object o1,
                   Object o2)
Compare two Measurements based on their timestamps.

Specified by:
compare in interface Comparator


This documentation is for the Location Stack v0.8. The latest distribution, the documentation, and the list of contributors to the Location Stack can always be found at http://portolano.cs.washington.edu/projects/location/

© Copyright 2004 University of Washington CSE