Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.RuntimeCollective.sitemap
Class SiteNodeCreationDateComparator  view SiteNodeCreationDateComparator download SiteNodeCreationDateComparator.java

java.lang.Object
  extended bycom.RuntimeCollective.sitemap.SiteNodeCreationDateComparator
All Implemented Interfaces:
java.util.Comparator

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

This is to sort SiteNodes by CreationDate. Defaults to ascending order; you can construct one with ascendingOrder = false if you want descending order.


Field Summary
private  boolean ascendingOrder
           
 
Constructor Summary
SiteNodeCreationDateComparator()
          Make a new SiteNodeCreationDateComparator, which orders by CreationDate in ascending order.
SiteNodeCreationDateComparator(boolean ascendingOrder)
          Make a new SiteNodeCreationDateComparator, which orders by CreationDate in ascending order.
 
Method Summary
 int compare(java.lang.Object o1, java.lang.Object o2)
          Compare the two SiteNodes
 int compare(com.RuntimeCollective.sitemap.bean.SiteNode sn1, com.RuntimeCollective.sitemap.bean.SiteNode sn2)
          Compare the two SiteNodes
 boolean equals(java.lang.Object obj)
          Returns if the given object is equal to this object
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ascendingOrder

private boolean ascendingOrder
Constructor Detail

SiteNodeCreationDateComparator

public SiteNodeCreationDateComparator()
Make a new SiteNodeCreationDateComparator, which orders by CreationDate in ascending order.


SiteNodeCreationDateComparator

public SiteNodeCreationDateComparator(boolean ascendingOrder)
Make a new SiteNodeCreationDateComparator, which orders by CreationDate in ascending order.

Method Detail

compare

public int compare(java.lang.Object o1,
                   java.lang.Object o2)
Compare the two SiteNodes

Specified by:
compare in interface java.util.Comparator

compare

public int compare(com.RuntimeCollective.sitemap.bean.SiteNode sn1,
                   com.RuntimeCollective.sitemap.bean.SiteNode sn2)
Compare the two SiteNodes


equals

public boolean equals(java.lang.Object obj)
Returns if the given object is equal to this object

Specified by:
equals in interface java.util.Comparator