org.vrspace.neurogrid
Class EventComparator

java.lang.Object
  extended byorg.vrspace.neurogrid.EventComparator
All Implemented Interfaces:
java.util.Comparator

public class EventComparator
extends java.lang.Object
implements java.util.Comparator

EventComparator, use in SortedSets containing events


Constructor Summary
EventComparator()
           
 
Method Summary
 int compare(java.lang.Object o1, java.lang.Object o2)
          This compares two Events.
 boolean equals(java.lang.Object obj)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EventComparator

public EventComparator()
Method Detail

compare

public int compare(java.lang.Object o1,
                   java.lang.Object o2)
This compares two Events. Comparison order: UriTriple, happened, user, eventType This way we rule out most elements immediatelly, so remaining few can be processed sequentially.

Specified by:
compare in interface java.util.Comparator

equals

public boolean equals(java.lang.Object obj)
Specified by:
equals in interface java.util.Comparator